1
ERROR :- {"error":{"message":"(200) The user hasn't authorized the application to perform this action","type":"OAuthException","code":200}} 

我在我的应用程序中使用了以下代码。在此代码中,如果我打开我的 Facebook 帐户,则它是成功发布,但如果其他人登录,则它无法在他的墙上发布。

public void postMessageOnWall(String msg) throws FacebookError, JSONException
{
    if (facebook.isSessionValid())
    {
        Bundle parameters = new Bundle();
        parameters.putString("message", msg);
        try
        {
            //JSONObject response=Util.parseJson(facebook.request("me/feed", parameters,"POST"));
            String response = facebook.request("me/feed", parameters,"POST");
            System.out.println(response);
        } 
        catch (IOException e) 
        {
            e.printStackTrace();
        }
    }
    else
    {

    }
}

我在 Facebook 上分享时使用了 FACEBOOK_PERMISSION = "publish_stream"。

4

0 回答 0