Streaming Facebook Pages Wall (not just the pages posts) - facebook

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.

Related

Tag persons in Facebook page post

I've written a Facebook web application, which is able to post links to the app page feed (as the page) by requesting the page token and doing a post request to the /PAGE_ID Graph REST endpoint. So far, so good, but I'd like to tag the links with their authors as well. When I add the tags parameter to this request with a value of my user id (I am an admin of the page), this works fine. But when I enter another user id (even one that likes the app page), no tagging is done. Does anyone have any experience with this? Some blog post suggest this is not possible using the Graph API, even though this is possible when done manually.
Thanks!
If I understand correctly what you want to do, it is no longer possible with the new version of the Facebook's API (v.2.0).
Refer to this page for more informations.

Get user's detailed newsfeed(wall) posts in Facebook

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

Link or connect facebook comments plugin to comments on fan page wall posts

Facebook comments plugin - as far as I understand, if I have put the facebook comments plugin on a post web page, and the permalink of the post being commented on matches the base URL, then comments are stored via facebook using my post permalink.
Lets say if I post the permalink onto my facebook page wall (which I am the admin of), the open graph tags come into play, all the relavant data is pulled in, fb:admins, fb:app etc.
But is it possible to connect my facebook page (using my facebook page ID) to that permalink - so that comments posted on the page using comment plugin, connect/link with the post comments on my facebook page wall?
Thanks
This is currently not possible. We've implemented custom solution using Facebook Application and Facebook Javascript SDK on the website itself. You need to query the comments table of a specific Page post via FQL using your app access token from your server to retrieve all comments and render them on the page.
Then you need to provide user with several entry points for several states in order to enable posting for them. You need to solve four cases:
User doesn't like the page and didn't authorize your app
User doesn't like the page and authorized your app
User likes the page and didn't authorize your app
User likes the page and authorized your app
User needs to like your page and authorize your app with publish_stream permission in order to be able to comment on your page posts via your website. Of course you need to maintain reference between posts on your page and posts on your website.
The website where we did this a few years ago is BIGGBOSS click on "Komentáře" and find the same post on Facebook with the same comments.
As far as I understand your question its not possible to connect the comments from the commentbox, integrated in your non-facebook page (e.g a blog of yours), to the comments which are posted to a post on your fanpage.
The only solution would be to build an custom commentbox with the open-graph and publish the comments to the fanpagepost and additionally extract the comments out of the fanpage to display them on your blog.
But this requires accepting permission dialog before people are able to comment on your blog which would probably decrease the comments made. You would lose the benefit of the built-in commentbox.

How do I query links shared by Facebook Pages?

I can get a user's page/likes list using the graph /me/likes. But how can I return a list of links shared by these Pages?
For example, let's say a user likes the Facebook Platform Page. I can pull this id (19292868552) using the /me/likes graph api. But how can I pull the links that the Facebook Platform Page has shared on their page?
For a regular user you would do something like this:
Sample FQL:
SELECT link_id, title, summary, url FROM link WHERE owner IN (19292868552);
But for Facebook Pages (like the above Facebook Platform Page example), this returns null. But the actual Facebook Platform Page shows dozens of links (at least). How can I get the links shared by these pages?
You can test it here:
FQL Query Test Console
I'm a little late to the party here, but I thought I'd post my gist example here. fbconsole makes it fairly simple to extract data through the Facebook Graph API to address this issue.
The caveat is that it was not terribly easy to programmatically extract data through fbconsole so I wrote the fbconsole.automatically_authenticate to make it much easier to access this information in a systematic way. This addition has not yet been incorporated into the master branch of fbconsole (it was just posted this morning), but it is available here in the meantime for those that are interested.

Programmatically posting Facebook comments

My application has obtained publish_stream permissions for a Facebook user.
I'd like to allow the user to post comments for a target URL directly from my mobile application, rather than opening up an embedded browser that then shows the Comment Box plugin. That is, the user doesn't necessarily want to post the link to their feed -- rather they want to participate in any Facebook comment discussion that surrounds that URL.
Naturally, I can read the comments for any URL via the Graph API (eg: a techcrunch article) but I do not know how, or if I can add comments to an arbitrary URL programmatically.
Would love to hear any other suggestions or workarounds as well. My hope is to piggy back on Facebook comments to allow my users to have a conversation surrounding URLs of interest to them. If at all possible, I'd also prefer to use Facebook, though I can see using Disqus or similar services would be another possibility.
Use graph api, demo comments here
make POST to
http://graph.facebook.com/comments/?ids=http://techcrunch.com/2011/07/22/big-surprise-the-ipad-trumps-android-tablets-at-the-office/
with field message and value "yourmessage"
I genuine Facebook API bug.
Cannot comment via Graph API on Comments Plugin (Probably try Legacy API)
Graph API