我需要从我的Facebook应用程序发布消息到Facebook页面链接。 我解释我是怎么做的,请告诉我,如果这不好的话。 THX。
1)我创建了一个facebook App。 所以,我有一个clientID和secretKEY。
2)我继续我的应用程序的高级设置,自动创建链接的Facebook页面。
3)我在浏览器中执行此请求: https://graph.facebook.com/oauth/access_token?type=client_cred&client_id=clientID&client_secret=secretKey
所以,现在,我有一个accessToken。
4)我的Jave代码(注意:我使用Restfb):
FacebookClient facebookClient = new DefaultFacebookClient("access_token");
facebookClient.publish("clientID/feed", FacebookType.class, Parameter.with("message", "wWwow!!!"));
5)我的控制台说我:
21 mars 2012 15:12:39 com.restfb.DefaultWebRequestor executePost
INFO: Executing a POST to https://graph.facebook.com/********/feed with parameters (sent in request body): message=wWwow!!!&access_token=*******&format=json
21 mars 2012 15:12:40 com.restfb.DefaultFacebookClient makeRequestAndProcessResponse
INFO: Facebook responded with HTTP status code 200 and response body: {"id":"******"}
所以,我认为它很好,状态真的更新了,不是吗?
问题:我在与应用程序链接的Facebook页面上看不到任何内容。也许我必须修改设置?或者我的代码不好? 有人可以帮帮我吗?