本文介绍了是否有可能QUOT&;像" A"扇页"使用Facebook SDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让用户喜欢一个Facebook粉丝页面内从一个Android应用程序。我能够成功地喜欢使用code这样的对象,如墙壁的意见,

I am trying to let users "like" a Facebook fan page from within an Android app. I am able to successfully "like" objects such as wall comments using code like this,

mFacebook = new Facebook(APP_ID);
SessionStore.restore(mFacebook, this);

mAsyncRunner = new AsyncFacebookRunner(mFacebook);
Bundle parameters = new Bundle();
mAsyncRunner.request(COMMENT_ID + "/likes", parameters, "POST", new MyRequestListener(), "");

不过,如果我把一个页面的id,而不是评论的ID,我得到了Facebook的响应此错误消息,

However, if I put in a page id rather than a comment id, I get this error message in the Facebook response,

Response: {"error":{"type":"OAuthException","message":"(#200) App does not have permission to make this call"}}

我获得两个publish_stream,并在登录offline_access发布权限,并给他们以Facebook的对象SessionStore.restore()。

I am obtaining both the "publish_stream" and "offline_access" publishing permissions at login, and they are given to the Facebook object with SessionStore.restore().

1)实是否让应用程序之类的粉丝页面?

1) Does Facebook let apps "like" fan pages?

2)如果是这样,什么我做错了任何想法?

2) If so, any ideas on what I am doing wrong?

谢谢,马特

推荐答案

在Facebook的文档的页面已经更新,并为当前(见https://developers.facebook.com/docs/reference/api/page/).你可以不喜欢通过图形API页面,即使你可以读出像数的信息。

The Facebook documentation for Pages has been updated and is current (see https://developers.facebook.com/docs/reference/api/page/). You cannot like a Page via the Graph API, even though you can read the like count information.

这篇关于是否有可能QUOT&;像" A"扇页"使用Facebook SDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 02:27