i'm looking for a way to code some statistics for a facebook group which displays infos like most active member, most commented post and such.
i've tried to parse the group's email-notifications, unfortunately facebook doesn't notify on each event.
so i was thinking about curling directly from the facebook group.
is there a way to do this or is it possible through the facebook api?
thanks
I think your best bet is Facebook Grap API.
Check this Graph API - Group : http://developers.facebook.com/docs/reference/api/group/
Hope this help!
Related
Need some help understanding the Facebook documentation.
Using the Facebook Graph API, Can you log users into your site then allow them to post to a Facebook group?
Or is it only the group admin that can post to the group. If so, does anyone know if this is something that has changed recently ?
https://developers.facebook.com/docs/graph-api/reference/v2.5/group/feed
Can you log users into your site then allow them to post to a Facebook group?
A specific Facebook group yes. As long as you know the ID beforehand.
For everything else the only groups available will be those seen from user_managed_groups
GET calls to the url http://www.facebook.com/ajax/typeahead_friends.php?u=${USER ID}&__a=1 (replace ${USER ID}) seem to get the friends list of that user. Is there an ``official'' way of doing this, i.e. through the documented facebook APIs?
A more "offical" way is to use the Graph api.
I've been sarching for hours on FB graph api docs and google but couldn't find a solution. Let me explain my question. Using the FB graph API, we are able to retrieve user's newsfeeds, but how do we retrieve user's newsfeeds that are posted by FB apps, such as game scores/achievements? I know that it's possible to retrieve user's newsfeeds created by a specific app by adding filter=app_[app_id], but is there a way to filter newsfeeds that are created by any apps?
Currently what I do is that, if a newsfeed contains a link that links to app.facebook.com, I assume it's posted by an FB app. I'm not sure if this assumption is safe and is there a better way to achieve my goal?
P.S. I use php SDK so a php solution is highly appreciated. Solutions using other SDK are also appreciated. I'll try to make a conversion by myself.
Thanks in advance,
Kaze
Currently what I do is that, if a newsfeed contains a link that links to app.facebook.com, I assume it's posted by an FB app.
Posts in /me/feed that have been made by/using an app should have a property "application" set, which contains the app name, namespace and id – so by just looking for that you should be able to determine if it was posted by an app or manually.
I need to grab the statuses from a Facebook page via PHP to display on the page. I don't want to have people logging in to facebook just for my script to grab the statuses from the page since it is a public page and isn't restricted. I have the Facebook API for PHP in my projects directory but have no idea how to use it to do what I want it to. Could someone give me a code example of how I'd do this? Thanks!
It's really a straight forward task if you follow the documentation. Since /PAGE_ID/feed requires any valid access_token, your app access_token is enough to get the data:
Open the Graph API Explorer (I'm querying coca-cola/feed)
Get an app access_token from the Access Token Tool and use it instead of yours
You're done!
Im kind of new in facebook development, so be patient with me :)
I'm creating an app that manage the photo albums user. One of the features i'm developing needs to access the friends photos. I mean, the photos that my app user can see of his friends. How can retrieve thats albums and photos information? I have user_photos and friends_photos permission.
Any sugestion?
Thanks in advance!!
Sorry for my lame english. Is not my native language.
Sebastian
You need to make an API call, for this you can use Facebook Graph API.
Look at the following API for albums
http://developers.facebook.com/docs/reference/api/album/
This is for generic purpose, however you need to first pull all the friends from here
http://developers.facebook.com/docs/reference/api/FriendList/
To fetch the albums of a friend you also need to set permissions
http://developers.facebook.com/docs/reference/api/permissions/
check:friends_photos
You can simply fetch the album like this
https://graph.facebook.com/{userId}/albums?accessToken=something
PS. you need to pull albums of friends one by one.
References to get you started
Start with the Graph API:
developers.facebook.com/docs/reference/api/
Read up on a few more things:
http://developers.facebook.com/docs/opengraph/
http://developers.facebook.com/docs/
Use Graph explorer to test things out:
http://developers.facebook.com/tools/explorer/
Your fist app
Now in order to do anything on facebook you need to create an application. You will get an app token when you do this. Something like: 288229791195831
Your users need to Like your application in order to use it. Then you can use it to post photos, wall messages etc.
This is the URL your application could use to log in a user:
https://graph.facebook.com/oauth/authorize?client_id=288229791195831&redirect_uri=http://www.facebook.com/connect/login_success.html&type=user_agent&display=popup&scope=publish_stream,user_photos,read_stream,email
Replace your client_id with the app id you get from facebook. Scope shows the permissions this app is requesting.
Good luck!