2016-09-25 2 views
-1

Ich integriere Facebook SDK zu meiner Android App. Ich folgte Führer: https://developers.facebook.com/docs/graph-api/reference/v2.7/post. Ich versuche Detail einen Beitrag in einer öffentlichen Gruppe von Verfahren zu erhalten:Facebook Android SDK - Holen Sie sich einen öffentlichen Beitrag Details zeigt keine vollständigen Felder

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(); 

Und ich bekam die Antwort:

{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}

Check out facebook Felder unten stehende Tabelle: enter image description here

Es scheint, dass einige Felder werden vermisst wie Name, Beschriftung, von ... Kannst du mir erklären und mir einen Vorschlag machen, um Felder wie Name, Bildunterschrift, aus zu bekommen?

UPDATE: Ich fand die Lösung für diesen Beitrag unter: Android Facebook - How to get like count for a post?.

Antwort

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

Danke. Ich habe es versucht . Aber ich habe die gleiche Antwort bekommen. Hast du irgendwelche Vorschläge ? letzte Zeichenfolge POST_ID = "1446400445645839_1796360410649839"; GraphRequest Anfrage = neue GraphRequest (.... ); Bündelparameter = new Bundle(); parameters.putString ("Felder", "ID, Name, Link"); request.setParameters (Parameter); request.executeAsync(); } –

+0

Ich folgte https://developers.facebook.com/docs/android/graph/ –

Verwandte Themen