Android Facebook Open Graph类型参考错误

时间:2012-04-11 01:28:56

标签: android facebook-opengraph facebook-oauth

当我尝试发布我的Facebook Open Graph Action时,我收到以下错误。

以下是我提交代码的方式。

JSONObject test = new JSONObject();
test.put("type","myappnamespace:myCustomType");
test.put("title","test");
test.put("url","http://samples.ogp.me/314782891908537");
Bundle params = new Bundle();
params.putString("access_token", GetAccessToken(mContext));
params.putString("myCustomType", test.toString());
AsyncFacebookRunner request = new AsyncFacebookRunner(facebook);
request.request("me/myappnamespace:myCustomAction", params, "POST", new addToTimelineListener(), null);

错误:

{"error":{"message":"(#3503) \"{
\"type\":\"myappnamespace:myCustomType\",
\"url\":\"http:\\\/\\\/samples.ogp.me\\\/314782891908537\",
\"title\":\"test\"}\" 
is an invalid value for property \"myCustomType\" with type 
"Reference\"","type":"OAuthException","code":3503}}

即使它说它是OAuthException,它与我的访问令牌没有任何关系。因为我可以使用相同的令牌通过应用程序将Feed发布到Facebook。

0 个答案:

没有答案