0
私は複数のページから壁紙を作成しようとしていましたが、元のFacebookページ以外のページから投稿をしようとすると、java.lang.NullPointerExceptionの例外が表示されます。複数のページからFacebook wall post
私は呼び出すと、このメソッドを呼び出すためのFacebookのページに
public void postOnWall(String msg) {
Log.d("Tests", "Testing graph API wall post");
try {
String response = mFacebook.request("me");
Bundle parameters = new Bundle();
parameters.putString("message", msg);
parameters.putString("description", "test test test");
response = mFacebook.request("me/feed", parameters,
"POST");
Log.d("Tests", "got response: " + response);
if (response == null || response.equals("") ||
response.equals("false")) {
Log.v("Error", "Blank response");
}
} catch(Exception e) {
e.printStackTrace();
}
}
とコードを作成しています方法。
try {
mFacebookObj.postOnWall("Add poi");
} catch(Exception e){
e.printStackTrace();
}
は両方ともアクティビティクラスである。
は今、誰もが私は答えはちょうどaccess_tokenはとtoken_expire値の値を復元、複数のページからから壁のポストを作ること、である。このページの外側からこのメソッドを呼び出すと、Facebookの壁を越え