4

I am trying to make a little desktop alert script that will tell me if there is a new post on my Facebook page's wall. It would be nice to see if I'm getting any new likes as well but really I mostly want to access my wall feed.

I don't need help parsing it or anything like that (I'm literally just going to compare a stored feed with how it is currently to see if there is a change once every 2 minutes or so) I just need to know how to access it.

Kara
  • 6,115
  • 16
  • 50
  • 57
TheBestJohn
  • 597
  • 1
  • 6
  • 14

4 Answers4

4

You can pull the content in your profile feed (wall) as a JSON object using the Facebook Graph API. You can check out the details here: http://developers.facebook.com/docs/reference/api/

Michael C. O'Connor
  • 9,742
  • 3
  • 37
  • 49
  • gotten to that part already. The access token from https://graph.facebook.com/me/feed has a expiry and dies every 15 minutes or so. I have read through for a few hours and thought there had to be a really simple way that someone possibly knew of. – TheBestJohn Jun 29 '11 at 17:56
  • 1
    Ah, yes, that is a bit trickier. Check out this answer: http://stackoverflow.com/questions/1059640/facebook-offline-access-step-by-step/3249758#3249758--I believe that may help you out. – Michael C. O'Connor Jun 29 '11 at 18:02
  • 1
    Now that was a huge pain in the ass... thanks for the help! Why they make it such a pain is beyond me.. I was 10 seconds away from writing a scraper... – TheBestJohn Jun 29 '11 at 18:25
1

Like McOcoonor said you should use the Facebook Graph API as documented here: http://developers.facebook.com/docs/reference/api/

If you want your application to have continuous, long-term access to your Facebook information then you need to add the offline_access permission flag to when the app requests the access token. Documented here: https://developers.facebook.com/docs/authentication/permissions/

For doing this all in Python you might be interested in this S.A. Question: Facebook Graph API and Django.

Community
  • 1
  • 1
Chris W.
  • 37,583
  • 36
  • 99
  • 136
  • Thanks for the input. It's funny you linked to that Question because I was already using simplejson to grab the info pretty much exactly like that... the only thing is it puts it into a dictionary with only 2 keys... 'data' and 'pages' where data has what you really want to be a dictionary in it. – TheBestJohn Jun 29 '11 at 19:56
0

If you are using facebook sdk for python (https://github.com/mobolic/facebook-sdk), you can use get_connections method(http://facebook-sdk.readthedocs.io/en/latest/api.html#get-connections)

import facebook

graph = facebook.GraphAPI(access_token) feeds = graph.get_connections('me', 'feed')

Saish Sali
  • 274
  • 1
  • 6
0

You can try to use a library to access your facebook wall. It requires register your application on facebook but it's easy to do http://developers.facebook.com/setup/

Then you can check out a python wrapper to the facebook api -> http://code.google.com/p/pyfb/ Or download it from pypi -> sudo pip install pyfb

user848192
  • 41
  • 5