How get comments, likes, events that my news feed displays - facebook

How get my OWN comments, likes, actions just like my wall's recent activity shows for me or same way how my friend's feed work (it shows - "somebody likes a photo/video/anytng")?
Even more simple question: how to get all of news feed objects? Not only posts returned by API /posts, /home, /feed etc. And not only basic likes returned by API /likes. I need "friend1 commented ...", "friend2 likes photo", "friend3 and friend4 are now friends".
All of them.
I have fully checked access_token. Don't care about language/sdk.
Need your thoughts.

It looks like this is not possible. Very sad.
http://forum.developers.facebook.net/viewtopic.php?id=79350

You should check out facebook Graph API Docs: https://developers.facebook.com/docs/reference/api/
It has everything you're looking for.

Related

Automatically find public posts and comments on Facebook and unlike/remove them?

I'm using Facebook for many years, and I've liked and commented a lot of friends posts (status, photos, etc). The problem is that I didn't pay attention to that these posts were "public" or "for friends only". As a result, a person who is not a friends of mine can now see all these contents using a request of Graph Search like:
Photos liked by USERNAME
Posts liked by USERNAME
Posts commented on by USERNAME
...
Of course I could remove likes and comments one by one from the Activity log, but it would take several months... I could also use the Toolkit for Facebook available on Chrome, but unfortunately it only proposes to remove ALL likes or comments, of any kind, whereas I want to do it only for public ones.
Edit: This Chrome pluggin is actually a fake, don't use it!
Is there a way to do it with Graph API?
This post seems to mention there isn't, but I'm not sure. I found this post for instance.
Edit: #CBroe confirms "Facebook has recently removed the ability to (un-)like objects in the name of the user" so I guess the latter link is obsolete?
Admitting we've retrieved the posts or comments ID, for instance by parsing the html response of the Graph Search result, then:
Is there another way to launch a request to FB which unlikes or removes posts/comments?
What do you think about it?
Thanks!

How can I make my timeline with Graph API?

I've studied Facebook API for several hours, and googled lots of pages. But I can not find the way get posts list just like my timeline on Facebook app.
I would like to make a Web app that show my timeline posts just like Flipboard. I found an API to get my "story" and "my friends list". But I can not even imagine how to retrieve my friend post that shown on my timeline.
Is it impossible to replicate my timeline on my web app? Only Flipboard can do that? Do you have any hint?
To access the current User's News Feed use the "User/Home" request as described in the API Documentation.
In order to gain access to the User's News Feed you will be required to gain the "read_stream" permission. For information on how to request the appropriate permission, read the Login, authorization and permissions section of the Getting Started guide.
The request to me/home will return an array of News Feed items, which are comprised of statuses, pictures, likes, etc. You can see an example of the result by using the Graph API Explorer.
Compare the results to your Timeline and they should be nearly identical (currently I believe Ads/Promoted Posts are excluded from the API)"
Play around with the Graph API Explorer:
https://developers.facebook.com/tools/explorer/?method=GET&path=me%2Fhome
I had to change the permissions within the App and specifically give myself 'read_stream' access, but once that was complete I was able to run a '/me/home' Graph API GET Request and return a representation of my timeline. Good luck!
You can get the timeline this way:
$fb = new Facebook('{config}');
$fb->setDefaultAccessToken('{getAccesstoken}');
$request = $fb->get('/me?fields=feed.limit(10000){link}');
//
$graphObject = $request->getGraphNode();
return $graphObject;

Facebook API restserver error with likes and comments

I'm having this strange problem: I have a link for a picture and i want to display it on my wall. Now i want to know how many times it was liked, shared and commented on. Let's say my picture url is http://mywebsite.com/mypicture.jpg?468
Now, I share this picture on my wall, I get likes, shares and comments.
If i'm using the http://api.facebook.com/restserver.php?method=links.getStats&urls=... i can see the shares, but not the likes or comments number.
Why is that? Do you think it's because of the ?468 after the .jpg? If so, why is that happing and only the shares are counted, and not the likes or comments?
For starters, you should be using the Graph API. The restserver.php file you are pointing at is deprecated at this point.
You will want to use the send (or like) plugin from Facebook. The REST API is deprecated (no longer supported and will be pulled completely from Facebook at anytime).
Then your url being shared will get a id from facebook and the stats tracked. Here's some examples: http://graph.facebook.com/?ids=CocaCola or http://graph.facebook.com/?ids=http://www.coca-cola.com

Facebook - check who shares a link

When I type name of e.g. youtube clip in facebook search I can get number of people that share this link.
Is it posibble to fetch list of people sharing given like using facebook api?
No, you can't get who shared, only the total number. The easiest way to see the count is, for instance:
http://graph.facebook.com/http://stackoverflow.com
This solved my problem !
http://graph.facebook.com/http://stackoverflow.com
Creating Facebook apps was very easy, but now, you need to apply and ask for approval the app ... that sucks ...
You can do this with Facebook's FQL (Facebook Query Language), it gives you more information than the previously mentioned Graph API method, but Facebook are apparently going to turn off the FQL API on August 7, 2016. So its not going to be useful in the long term.
https://api.facebook.com/method/fql.query?query=select+comment_count%2C+like_count%2C+total_count%2C+share_count%2C+click_count+from+link_stat+where+url%3D%27stackoverflow.com%27
The interesting thing about this is it shows the result given by the previously mentioned Facebook Graph API request, i.e:
http://graph.facebook.com/http://stackoverflow.com
is actually giving the "total count", which is actually the sum of the likes, comments and shares of that link, the FQL method gives you the actual individual counts for comments, shares and likes.
Another method for getting the actual share count, is to use the links.getStats API call, but it appears to be undocumented, and nobody seems to know how long it will be available for.
Here's how to use it:
https://api.facebook.com/method/links.getStats?urls=stackoverflow.com&format=json

What is the API for Facebook 'profile stream' aka wall posts?

Is there an API call, and if so, which call to get the 'posts to my wall from myself and others' on Facebook? It seems like it could be filtered out of the Facebook stream API, but it's not clear how that works to me.
This link seems to imply it's possible:
http://developers.facebook.com/news.php?blog=1&story=225
You want to do an FQL query like this:
SELECT actor_id, message FROM stream WHERE source_id = <user id> limit 50
You will probably want to select a few more fields, you can see what is available here: http://wiki.developers.facebook.com/index.php/Stream_%28FQL%29
Here it is.
Profile feed (Wall): https://graph.facebook.com/me/feed?access_token=...
https://developers.facebook.com/blog/post/465
You can publish stories to people who like your Open Graph Page the same way you write a Facebook post from your own wall. The stories appear in the News Feeds of people who have clicked the Like button on the Open Graph Page.
You can also publish using our API. If you associate your Open Graph Page with a Facebook app using the fb:app_id meta tag, you can publish updates to the users who have liked your pages via the Graph API.
First you need to get an access token for your app.
Check out the blog post, it covers everything you need.