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