如何使用Python Facebook Graph API [英] How to use the Python Facebook Graph API

查看:260
本文介绍了如何使用Python Facebook Graph API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你们中有谁能解释如何使用Facebook Graph API?这对我来说绝对没有意义。我知道我必须有一个api密钥和一个秘密应用密钥,我有这些密钥。我只需要知道使用Python从graph.facebook.com获取数据的基础知识。没有任何来源的任何人和它的杀害我。简而言之,我如何才能打开一个通过某个参数的网址,实际上将数据返回给我?



非常感谢
Justin

解决方案

Github中有一个用于Python-Facebook集成的库: https://github.com/pythonforfacebook/facebook-sdk



基本用法

  graph = facebook.GraphAPI(oauth_access_token)
profile = graph.get_object(me)
friends = graph.get_connections(我,朋友)
graph.put_object(me,feed,message =我正在写在我的墙上!)


Could any of you explain how exactly to use the Facebook Graph API? It makes ABSOLUTELY NO sense to me. I understand that I have to have an api key and a secret app key and I have those. I just need to know what the basics are to get the data from graph.facebook.com using Python. There are no sources ANYWHERE and its killing me. In short, how do I get to the point where I can open a url with certain parameter passed, and it actually return the data to me?

Thanks so much Justin

解决方案

There's a library in Github for Python-Facebook integration: https://github.com/pythonforfacebook/facebook-sdk

Basic usage

graph = facebook.GraphAPI(oauth_access_token)
profile = graph.get_object("me")
friends = graph.get_connections("me", "friends")
graph.put_object("me", "feed", message="I am writing on my wall!")

这篇关于如何使用Python Facebook Graph API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆