0
我正在開發一個facebook登錄登出的例子,它對我來說工作正常。我的問題是當我張貼飼料到Facebook牆時,它迴應某種類型的錯誤。 我看了很多帖子,但沒有得到result.thanks ...Facebook的迴應給用戶發佈牆壁時沒有授權應用程序
protected void PublishFedd() {
Session s = Session.getActiveSession();
String testing="My testing app";
Request request = Request.newStatusUpdateRequest(s,testing, new Request.Callback()
{
@Override
public void onCompleted(Response response)
{
String checkTask=sharedpreference.getString("TASK_NAME", null);
Log.i(TAG,"ExistingTask:"+checkTask);
Boolean isNetworkConnected=inetDetector.isInternetConnected();
if(isNetworkConnected)
{
Log.i(TAG,"ResponseError:"+response.getError());
if (response.getError() == null)
{
SharedPreferences.Editor edit=sharedpreference.edit();
//edit.putString("TASK_NAME", testing);
edit.commit();
Toast.makeText(FacebookMainActivity.this, "Status updated successfully", Toast.LENGTH_SHORT).show();
}
else
{
}
}
else
{
Toast.makeText(FacebookMainActivity.this, "Network Connection Failure", Toast.LENGTH_SHORT).show();
}
}
});
request.executeAsync();
}
錯誤日誌是:
ResponseError:{HttpStatus: 403, errorCode: 200, errorType: OAuthException, errorMessage: (#200) The user hasn't authorized the application to perform this action}
我也面臨着同樣的問題,這個任何想法幫助我.. – NagarjunaReddy
你會給許可,您的編碼部分... – Satheesh
看到這個鏈接,它可以幫助你http://stackoverflow.com/questions/18781686/error-retrieving-email-and-location-from-facebook-request-in-android/18870420#18870420 – Satheesh