Python如何使用图形API执行Facebook Wall Post? [英] Python how to do facebook wall post using graph api?

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

问题描述

我正在尝试使用facebook graph api将消息发布到我的墙上.我有我的access_token.我已经在浏览器中尝试使用以下URL.

i am trying to post a message into my wall using facebook graph api. I have my access_token. I have tried in my browser using following URL.

https://graph.facebook.com/me/feed?message="Hii friends"&access_token=xxxxxxxxxx

但是消息未发布.所以我无法解决这个问题.最后,我想在urllib2.urlopen()中使用此URL

But message is not posted. So i couldn't solve this problem. Finally i want to use this URL inside urllib2.urlopen()

请帮助

推荐答案

我最近在Facebook上发帖了,可以这样工作:

I recently got posting to facebook to work like so:

import requests

face_token = 'your_token'
post = 'Your Post wowzers'
post.replace(' ', '+')
requests.post("https://graph.facebook.com/me/feed/?message=" + post + "&access_token=" + face_token)

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

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