FacebookのコピーURLを使用してfacebook動画のmp4 URLと親指の画像を取得したいと思います。私のコードは以下のとおりです。誰でも、この問題を解決するのを助けてください。FacebookのコピーURLを使用してFacebookの動画の詳細を取得するには
https://www.facebook.com/shreyaghoshal/posts/10155774118036484
request= GraphRequest.newMeRequest(AccessToken.getCurrentAccessToken(),
new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(
JSONObject object, GraphResponse response) {
try {
if(object!=null) {
create_facebookID = object.getString("id").toString();
Log.e("facebook" ,"id"+create_facebookID);
new GraphRequest(
AccessToken.getCurrentAccessToken(),
create_facebookID+"_10155774118036484",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
Log.e("response", "res...." + response.toString());
}
}
).executeAsync();
}
}catch (Exception e){
e.printStackTrace();
}
}
});
Bundle parameters = new Bundle();
parameters.putString("fields", "id,name,email,gender, birthday");
request.setParameters(parameters);
request.executeAsync();
これは私が取得しています応答です。私はビデオのURLを取得したい。 10-31 10:04:45.203 27233-27233/com.tweak.tweakビデオE /レスポンス:res .... {レスポンス:レスポンスコード:200、グラフオブジェクト:{"created_time":"2017-10-09T09:12:56+0000","message":"I think I forgot how to breathe! Heart skipped beats. #PadmavatiTrailer is pure goosebumps. #SanjayLeelaBhansali has created the unthinkable.\nThe poetic magic that he alone can bring to the screens.Deepika Padukone Shahid Kapoor Ranveer Singh bring their best in this film! Music coming soon. Stay tuned.","the story":"Shreya Ghoshal shared Padmavati's video.","id":"11541726483_10155774118036484"}, error: null}
ビデオID(文字列関数、正規表現)を抽出し、そのIDを使用してAPI経由でオブジェクトの詳細をクエリする必要があります。 – CBroe