I was pulling RSS feed from a few Fan Pages and posting to our sites. suddenly Facebook seems to have blocked or shut off RSS feeds. I am not finding a good solution or method to pull these posts from a few facebook pages ... Anyone have any suggestions?
A little more detail I was using IFTT.com to pull the rss feed and then put it were I wanted it. So the trigger was:
https://www.facebook.com/feeds/page.php?format=rss20&id=(page id)
Suddenly all of these return the following error
Not a valid feed url, missing feed title
Any suggestions code gurus?
The RSS feed is gone, the only way to get the Page feed is the feed endpoint: https://developers.facebook.com/docs/graph-api/reference/page/feed
You will need an App for this though, because you need to use a Token for the endpoint. An App Access Token is good enough though, so the API endpoint would look like this:
https://graph.facebook.com/[page-id]/feed?access_token=APPID|APPSECRET
More information about Access Tokens and how to generate them:
https://developers.facebook.com/docs/facebook-login/access-tokens
http://www.devils-heaven.com/facebook-access-tokens/
Related
I'm developing a friend's company web site (PHP). He would like to display last Facebook posts from his professional Facebook page.
I'm using the Facebook Graph API for the first time and the documentation is huge and not user friendly at all. Anyway I created a Facebook App. After retrieving OAuth token it looks as simple as:
$data = file_get_contents("https://graph.facebook.com/".$pageId."/feed?access_token=".$token."&limit=10&fields=message,link,attachments,created_time,full_picture,picture,timeline_visibility");
BUT from what I understand this requires the Page Public Content Access permission. To get it you need to review your app.
The review process is insane! My app was rejected 3 times and they didn't explain how to make it pass. Each time they simply replied with this laconic message:
Is there any other way to get the posts of a public page?
Thanks a lot for your help! It will be much appreciated!
Ok I get some restriction from facebook which I am unable to find in developer docs.
When I request data from facebook using
https://graph.facebook.com/{user-id}/feed?limit=1&locale=en_GB&access_token={access-token}&fields=id,from,message,link,actions,status_type
Everything works ok for profile. Though for a page it provides feeds, that page has created and shared from other pages, but it never returns feeds which are shared from a facebook profile.
I tried sending some other parameter in fields, but nothing works for me. Any suggestions?
ok, I think I get the answer. And it is impossible as it is a restriction from facebook API since API 2.0
I get some answers from facebook team on this. Below is the link to it:
https://developers.facebook.com/bugs/1057965060965057
I would like to build a project to know users' behavior when they surf facebook website, especially the advertisements showing in their timeline wall. I have learned the basic idea of facebook graph api, knowing how to access the users' information and their feeds. However, I found that the feeds returned by facebook graph api is not "exactly" what user really see when they open facebook url in their browser. First, in graph api, it doesn't show the advertisements posted by sponsors. Second, the feeds returned by facebook api seem only regarding to my own posts(e.g. the photo tagging me, the posts tagging me). So, I would like to know how to access these information to rebuild a testbed that looks like exactly same as the real facebook website to record people reaction to it and continue my research?
Any idea is welcome ^^
This isn't really possible or rather I don't know any API (Facebook/Twitter/etc) that would do this to their third-party developers. The point of the API is to pull user data, not ads.
Also it sounds like you are using /me/posts or/me/feed instead of /me/home
I need to display the "wall posts" from Facebook page to another website's social media wall.
The problem is that I never used neither Facebook nor any other social networks and got no clues on how do they work. That's why I'm pretty confused with API and it's terms.
The API docs say that I need a pageId for the page I'd like to display and appId and appSecret to get an access token to the feed.
I understand how to get the token and how to parse the results - but what kind of Application do I need for that? Should I create a facebook profile and make an application that would generate me these app codes? Or ask a page's owner to do it?
I spent quite a time googling but it must be something too obvious to write about it in docs? Help please?
The administrator of the facebook page is the only one that has access to the posts on the page wall.
For the APP:
The application can be created in any facebook verified account - go to: https://developers.facebook.com/apps and create the new app - this will give you the app id and secret.
Use the Facebook SDK that you feel most comfortable with to develop the app.
For the wall posts: There are several Graph API requests for wall posts in the form of:
https://graph.facebook.com/[pageid]/[call] where [call] can be posts, statuses, feed, home. See http://facebook.stackoverflow.com/questions/6214535/what-is-the-difference-between-feed-posts-and-statuses-in-facebook-graph-api for details about each.
Using an access token (that you said you already know how to get) the administrator of the page will be able to call the above URLs and get the wall posts.
For the part with posting the info on another social media website you have to specify the exact environment where you want the wall posts to end up.
I have looked on 100 forums looking for a simple answer for how to stream every post on a Facebook page's wall (not using the like box for just the pages posts, but everyone's posts). I am the admin of the page and I am already using the like box for my posts so I understand that, however the developer pages of Facebook are too confusing for such a simple task. I will be inserting the stream into an HTML page which will be hosted on www.1and1.com so it can handle most, if not all code.
I know it is a lot to ask but is there evem someplace online that will offer plain step-by-step instructions for my specific needs?
If the social plugins they make available aren't sufficient, you could just pull in the feed with the Facebook graph api using the javascript sdk (easiest) or there is probably an SDK for whatever programming language you know. For example, you can see a list of posts on the coca cola page using the Facebook graph explorer:
https://developers.facebook.com/tools/explorer/?method=GET&path=cocacola%2Ffeed
The /page/feed method needs an access token, but you can use the graph explorer to get an offline_access token that you can use to pull the data in. This may eliminate javascript sdk usage though unless you want to first prompt users to authenticate your application. But otherwise you would just parse the json feed that is returned in the url indicated in the graph explorer (and add your access_token to the end of the url).
Here is a good PHP tutorial on how to display a groups feed on a web page. It would be just as easy to display the posts from a page (since you are the admin)
Just replace the group ID with the page ID. Here is a link to the feed for the Facebook Platform feed graph api results. More info on FB Pages here.