2
我想張貼照片給我的朋友的牆..我可以做到這一點,但有一個問題。任何人都看不到它。我的意思是這張照片只顯示好友的牆..不是我或者不是別人朋友。我使用了一些權限,但也許我錯過了一些東西..將照片張貼到朋友的牆上與Android的
private static final String[] PERMS = new String[] {"manage_pages", "read_insights", "user_checkins", "user_birthday","friends_birthday","email","user_photos","publish_checkins","publish_actions", "read_stream" ,"publish_stream","read_friendlists"};
,這裏是我的代碼..
public void postPhoto() {
String accessToken = mFacebook.getAccessToken();
params.putString("message", message);
params.putString("target_id", friendID);
params.putString(Facebook.TOKEN, accessToken);
response= mFacebook.request(friendID" + "/photos", params, "POST");
response = "{\"data\": [" + response + "] }";
String photoID = GetIDPhoto(response);
setTag(photoID, friendID);
}
private void setTag(String photoID,String friendID) {
String relativePath = photoID + "/tags/" + friendID;
Bundle params = new Bundle();
params.putString("x", "30");
params.putString("y", "30");
String response ="";
try {
response = mFacebook.request(relativePath, params, "POST");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Toast.makeText(getApplicationContext(), response, 3000).show();
}
我的錯誤在哪裏?
感謝您的關注,但它不是問題。因爲它的工作..我可以使用JSON和我可以得到ID ..這意味着,與JSON沒有問題..但我明白哪裏是問題。我不太瞭解Facebook。我的朋友必須接受這張照片.. :)然後現在沒有問題。再次感謝你 – ertan2002 2012-03-24 23:39:47