我寫的應用程序與facebook集成。我想發佈到牆上沒有發佈對話框。我嘗試使用code from this answer,但我得到了一個錯誤錯誤OAuthException 2500同時發佈與Facebook圖表API
{"error":
{"message":"An active access token must be used to query information about the current user.",
"type":"OAuthException",
"code":2500
}
}
我登錄的用戶使用此代碼
public void authorize() {
mFacebook.authorize(mActivity, new String[] { "publish_stream" }, new DialogListener() {
@Override
public void onComplete(Bundle values) {
SharedPreferences.Editor editor = mPrefs.edit();
editor.putString("access_token", mFacebook.getAccessToken());
editor.putLong("access_expires", mFacebook.getAccessExpires());
editor.commit();
mLoginStateView.setImageResource(mAuthorizedDrawableRes);
}
@Override
public void onFacebookError(FacebookError error) {}
@Override
public void onError(DialogError e) {}
@Override
public void onCancel() {}
});
}
請解釋我什麼我做錯了?
[加]
如果我嘗試後與mFacebook.dialog(currentActivity, "stream.publish", params, new UpdateStatusListener());
它的工作原理。請幫幫我!
也許我需要的任何其他權限? – ziwert