我想从我的应用程序在facebook上发布图片。我在角色部分添加了一些测试人员,但我收到了错误
<NSHTTPURLResponse: 0x173f0540> { URL: https://graph.facebook.com/me/photos } { status code: 403, headers {
"Access-Control-Allow-Origin" = "*";
"Cache-Control" = "no-store";
"Content-Length" = 138;
"Content-Type" = "application/json; charset=UTF-8";
Date = "Fri, 08 Apr 2016 12:25:46 GMT";
Expires = "Sat, 01 Jan 2000 00:00:00 GMT";
Pragma = "no-cache";
"Www-Authenticate" = "OAuth "Facebook Platform" "insufficient_scope" "(#200) Requires extended permission: publish_actions"";
"facebook-api-version" = "v2.5";
"x-fb-debug" = "ykTtJJLBH6+kIMTBZgp57OHBP7jrU+DjUhjNMftg4D9uu5oAwOAMflCDqCBEPuxPz7BnRQosYAwgu+0MkP6/cg==";
"x-fb-rev" = 2274481;
"x-fb-trace-id" = "DLGq2+8glRI";
} }
您应该使用[[FBSDKAccessToken currentAccessToken]hasGranted:@"publish_actions"]来检查此用户是否可以使用publish_action。你也应该检查一下这个页面https://developers.facebook.com/docs/sharing/best-practices这篇文章的内容中有一部分是关于图像的。