-1

私のアプリケーションでは、特定の Facebook 投稿のコンテンツ (メッセージ) を取得したい場合があります。その特定の投稿の postid id を取得できますが、その id に関連付けられたコンテンツを取得できません。post_id またはGraph API URLを使用して投稿メッセージを取得するためのFQLクエリが見つかりませんでした。

すべての投稿を取得するためのこの URL があります../100005002784039/posts?fields=id,name,messageが、投稿 ID を渡すときに投稿の特定のメッセージのみが必要です。

どうすればこれを達成できますか?

4

2 に答える 2

1

sahil のおかげで、私のURLは次のようになります。

https://graph.facebook.com/"+PostId()+"?access_token=Token);

コード

URL fbmsg = new URL("https://graph.facebook.com/"+trace.getFbPostId()+"?access_token="+TOKEN+"");
URLConnection yc = fbmsg.openConnection();

BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));

String inputLine;

String s = "";

while ( (inputLine = in.readLine()) != null)
    System.out.println(inputLine);

Log.d(TAG, "getPostId trace getFbPostId " + inputLine);
s = s + inputLine + "n";
Log.d(TAG, "getPostId trace getFbPostId " + s);
in.close();
System.out.println(s);
于 2013-01-28T07:34:05.913 に答える
0

API に対して次のクエリを実行するだけです。

/POST_ID
于 2013-01-28T06:51:56.143 に答える