2016-09-25 4 views
-1

私はアンドロイドアプリにFacebook SDKを統合しています。 ガイドに従いました:https://developers.facebook.com/docs/graph-api/reference/v2.7/post私はこの方法を詳細に公開グループ内の投稿を取得しよう:Facebook Android SDK - パブリックポストを取得するdetaisがフルフィールドを表示しない

final String POST_ID = "1446400445645839_1796360410649839"; 
new GraphRequest(
     AccessToken.getCurrentAccessToken(), 
     "/" + POST_ID, 
     null, 
     HttpMethod.GET, 
     new GraphRequest.Callback() { 
      public void onCompleted(GraphResponse response) { 
       /* handle the result */ 
       Log.d("DEBUG","post detail ---------------------"); 
       Log.d("DEBUG",response.toString()); 
       Log.d("DEBUG","post detail--------------------------"); 
      } 
     } 
).executeAsync(); 

そして私は、応答しまった:それはと思われ enter image description here

:下回る

{Response: responseCode: 200, graphObject: {"created_time":"2016-09-25T02:57:29+0000","message":"Because of its_________for outstanding customer service, Mei’s Hair Salon is the most popular business of its kind in the area. \nA. approval\nB. estimation\nC. probability\nD. reputation\nCâu này trong ETS 2016. đáp án theo sách mình down là D. Bạn nào giải thích giúp mình giữa C và D được không ạ?","id":"1446400445645839_1796360410649839"}, error: null}

は、Facebookのフィールドテーブルをチェックしてください名前、キャプションなど、いくつかのフィールドが欠落しています。 名前、キャプションなどのフィールドを取得するための提案を教えてください。

更新: この投稿の解決策は、Android Facebook - How to get like count for a post?です。

答えて

0

https://developers.facebook.com/docs/graph-api/using-graph-api

By default, not all fields in a node or edge are returned when you make a query. You can choose the fields or edges that you want returned with the fields query parameter. This is really useful for making your API calls more efficient and fast.

For example, the following Graph API call https://graph.facebook.com/bgolub?fields=id,name,picture will only return the id, name, and picture in Ben's profile:

+0

ありがとうございます。私は試した 。しかし、私は同じ反応を得ました。提案はありますか?最終的な文字列POST_ID = "1446400445645839_1796360410649839"; GraphRequest request = new GraphRequest(.... ); バンドルパラメータ= new Bundle();parameters.putString( "fields"、 "id、name、link"); request.setParameters(parameters); request.executeAsync(); } –

+0

私はhttps://developers.facebook.com/docs/android/graph/に続きました –

関連する問題