Quantcast
Channel: Implementing feed of Facebook page in the website - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Implementing feed of Facebook page in the website

$
0
0

I have to implement the Facebook feed (our website page in Facebook) in the home page.

I tried with this plugin (https://developers.facebook.com/docs/plugins/like-box-for-pages), but I couldn't change the display style. Example, I don't want to display logo, page title and images in the feed.

Graph API + JSON + jQuery seems the way to get and customize the Facebook feed before adding website. Image is attached for how to display the feed.

I went through the API's page of Facebook. But, I need some direction to follow if anyone have already done this.

I am using the below to get the feed.

  $(document).ready(function () {                              $.ajax({            url: 'https://graph.facebook.com/1234/feed?access_token=cxcx&callback=?', //Replace with your own access token            dataType: 'json',            success: displayFacebookFeed,            error:alertError        });    });

It's working fine, but the message I am accessing has links, which comes as text.

 var html="";        $.each(result.data, function (i, item) {            var body = item.message;            if (!body) {                body =  item.description;            }            html += "<li>"+ body +"</li>";        });

So for an example.

9 Sensational Traits of Highly Promotable Employees | Inc.com https://www.inc.com/jeff-haden/9-sensational-traits-of-highly-promotable-employees.html

In the above feed, I want this as link, but its coming as plain text.

Is there any suggestion?


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images