1

当我尝试发布 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 它与我的访问令牌没有任何关系。因为我可以使用相同的令牌通过应用程序将提要发布到 Facebook。

4

0 回答 0