开发者

Getting Started with Facebook API

I have a friend that owns a small business and has a Page on Facebook. I want to help her manage it from a marketing perspective, and开发者_如何学C figure that it may be best to do so through their API.

I have skimmed their API documentation, and have a basic working knowledge of Python. What I can't figure out is if I can access their page's data with Python and grab the data on wall posts, who liked posts, etc. Is this possible? I can't find a decent tutorial for someone who is new to programming.

To provide context, I have been scraping the Twitter Search API for some time now and I am hoping there is something similar (request certain data elements, and have it returned as structured data I can analyze). I find their API extremely straight forward, and for Facebook, I don't know where to begin.

I don't want to create an application, I simply want to access the data that is related to my friend's page.

I am hoping to find some decent tutorials and help on what I will need to get started. Any help you can provide will be greatly appreciated.


You could try Pyjamas Desktop. http://pyjs.org/ It runs python in an embedded web browser and gives you access to the html DOM. This potentially means that you can use the JS api directly from python. You will need to be running a server locally though.


Basically to automate posting stuff to the persons profile you need to get their oath token and then make API calls w/ that token.

Here are steps to get API token:

  1. Register APP w/ facebook and get app id
  2. Have your friend click this link https://www.facebook.com/dialog/oauth? client_id=[your app id here]& type=user_agent& scope=email,read_stream,,,user_about_me,offline_access,publish_stream& redirect_uri=http://www.facebook.com/connect/login_success.html
  3. Then record that token for future

You can now use any available python FB lib to post and manage that FB page.

This should get you started:

http://eggie5.com/20-getting-started-w-facebook-api

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜