私はFacebookのいくつかのテキストの興味深い断片をユーザーが共有できるように、私のアンドロイドアプリケーションを持っています。ユーザーの壁にFacebookのファンページとユーザーの壁に同じ時間に投稿します。アンドロイド
共有が正常に動作し、このチュートリアルを使用して実装されています http://www.integratingstuff.com/2010/10/14/integrating-facebook-into-an-android-application/
また、私は自分のアプリケーションのFacebookのファンページを持っていると私は、そのページ上のすべてのように、個々の株式を統合したいと思います。 誰かが自分の壁にテキストを共有すると、このプログラムはFacebookのファンページにも公開するので、誰かがディスカッションに興味がある場合、ファンページが好きで、他のユーザーがコメントを購読できるようになります。
私の問題は、ユーザーの壁に公開するか、ファンページに公開できることです。 どうすれば両方を同時に行うことができますか?
public void postToWall(){
Bundle parameters = new Bundle();
parameters.putString("message", this.messageToPost);
parameters.putString("description", this.messageDesc);
parameters.putString("link", this.messageLink);
// parameters.putString("target_id", FAN_PAGE_ID);
try {
facebook.request("me");
// String response = facebook.request("me/feed", parameters, "POST");
String response = facebook.request(FAN_PAGE_ID+"/feed", parameters, "POST");
Log.d("Tests", "got response: " + response);
if (response == null || response.equals("") ||
response.equals("false")) {
showToast("Blank response.");
}
else {
showToast("Message posted to your facebook wall!");
}
finish();
} catch (Exception e) {
showToast("Failed to post to wall!");
e.printStackTrace();
finish();
}
}
この行はファンページにユーザーの壁に
String response = facebook.request("me/feed", parameters, "POST");
そして、このいずれかを発行し
String response = facebook.request(FAN_PAGE_ID+"/feed", parameters, "POST");
私はこのポストを使用してファンページ上で公開するために私のアプリの権限を設定しています Simple example to post to a Facebook fan page via PHP?