2012-10-17 43 views
0

我試圖讓facebook牆data.I使用錯誤的請求爲響應

accesstoken=Login.mFacebook.getAccessToken(); 
Log.e("accesstoken",accesstoken); 

得到了我的訪問令牌,但同時呼籲

String wallres=UrltoValue.getValuefromUrl("https://graph.facebook.com/me/feed?  access_token=accesstoken"); 
Log.e("wall res",wallres); 

我收到錯誤的請求作爲應答

+0

是我的回答的回答你的問題?如果是這樣,請接受/ upvote它。當有人投入時間幫助你時,這是最不可能做到的。 – MarchingHome

回答

0

通過調用這段代碼,你說accesstoken實際上是URL的一部分。

String wallres=UrltoValue.getValuefromUrl("https://graph.facebook.com/me/feed?  access_token=accesstoken"); 

我覺得你的意思要做到這一點,讓你使用先前定義的變量accesstoken

String wallres=UrltoValue.getValuefromUrl("https://graph.facebook.com/me/feed?  access_token=" + accesstoken); 
0

我已經像這樣的問題。嘗試刪除空格或將其轉換爲%20。

String wallres=UrltoValue.getValuefromUrl("https://graph.facebook.com/me/feed?access_token=accesstoken"); 
Log.e("wall res",wallres); 

問候,雨果·佩德羅薩