0
내가 페이스 북 그래프 API me/home
를 통해 내 벽 게시물을 검색 그리고 난 그런 데이터를 가지고 :공유 페이스 북 포스트 (안드로이드 SDK)
{
"data": [
{
"id": "434028623322619_685556731503139",
"from": {
"category": "Games/toys",
"name": "Gameloft",
"id": "434028623322619"
},
"to": {
"data": [
{
"category": "App page",
"name": "World at Arms",
"id": "354464541311978"
}
]
},
"full_picture": "https://fbexternal-a.akamaihd.net/safe_image.php?d=AQBMneZMJOUbYmab&url=https%3A%2F%2Ffbcdn-photos-h-a.akamaihd.net%2Fhphotos-ak-prn2%2Ft1.0-0%2F10325354_685556454836500_2869075300782966829_s.jpg",
"link": "https://www.facebook.com/GameloftFR/photos/a.434045733320908.96670.434028623322619/685556454836500/?type=1&relevant_count=1",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/434028623322619/posts/685556731503139"
},
{
"name": "Like",
"link": "https://www.facebook.com/434028623322619/posts/685556731503139"
}
],
"type": "photo",
"status_type": "added_photos",
"created_time": 1400751098,
"updated_time": 1400751098,
"message": "Qui a déjà testé les nouveaux hélicos de l'update de World at Arms \n\nPostez nous vos plus belles images de combats en commentaire ! :-)\n\nTéléchargez le jeu sur #iOS et #Android : http://gmlft.co/V-wdI\n\nRetrouvez le #GameloftDirect dédié à cette nouvelle update ici : http://gmlft.co/6V8ny",
"object_id": "685556454836500"
},
{
"id": "297172963760_10152858184403761",
"from": {
"category": "Non-profit organization",
"category_list": [
{
"id": "10101384669488041",
"name": "Non-Profit Organization"
}
],
"name": "Fédération Française de Gymnastique",
"id": "297172963760"
},
"name": "31èmes Championnats d'Europe de Gymnastique Artistique Masculine",
"story": "Fédération Française de Gymnastique added 10 new photos to the album 31èmes Championnats d'Europe de Gymnastique Artistique Masculine.",
"full_picture": "https://fbexternal-a.akamaihd.net/safe_image.php?d=AQBuTwqYKGVuA-Yp&url=https%3A%2F%2Ffbcdn-photos-g-a.akamaihd.net%2Fhphotos-ak-frc3%2Ft1.0-0%2F10374508_10152858178588761_2381196158150497207_s.jpg",
"link": "https://www.facebook.com/photo.php?fbid=10152858178588761&set=a.10152856981978761.1073741840.297172963760&type=1&relevant_count=10",
"caption": "Retrouvez des photos des Championnats d'Europe mi-mai à Sofia (Bulgarie).",
"actions": [
{
"name": "Comment",
"link": "https://www.facebook.com/297172963760/posts/10152858184403761"
},
{
"name": "Like",
"link": "https://www.facebook.com/297172963760/posts/10152858184403761"
}
],
"type": "photo",
"status_type": "added_photos",
"created_time": 1400749843,
"updated_time": 1400749843,
"object_id": "10152858178588761"
}
]
}
지금 나는 feedDialog를 사용하는 게시물 중 하나를 공유 할을 :
private void publishFeedDialog() {
Bundle params = new Bundle();
params.putString("name", "Facebook SDK for Android");
params.putString("caption", "Build great social apps and get more installs.");
params.putString("description", "The Facebook SDK for Android makes it easier and faster to develop Facebook integrated Android apps.");
params.putString("link", "https://developers.facebook.com/android");
params.putString("picture", "https://raw.github.com/fbsamples/ios-3.x-howtos/master/Images/iossdk_logo.png");
WebDialog feedDialog = (
new WebDialog.FeedDialogBuilder(getActivity(),
Session.getActiveSession(),
params))
.setOnCompleteListener(new OnCompleteListener() {
@Override
public void onComplete(Bundle values,
FacebookException error) {
if (error == null) {
// When the story is posted, echo the success
// and the post Id.
final String postId = values.getString("post_id");
if (postId != null) {
Toast.makeText(getActivity(),
"Posted story, id: "+postId,
Toast.LENGTH_SHORT).show();
} else {
// User clicked the Cancel button
Toast.makeText(getActivity().getApplicationContext(),
"Publish cancelled",
Toast.LENGTH_SHORT).show();
}
} else if (error instanceof FacebookOperationCanceledException) {
// User clicked the "x" button
Toast.makeText(getActivity().getApplicationContext(),
"Publish cancelled",
Toast.LENGTH_SHORT).show();
} else {
// Generic, ex: network error
Toast.makeText(getActivity().getApplicationContext(),
"Error posting story",
Toast.LENGTH_SHORT).show();
}
}
})
.build();
feedDialog.show();
}
직접 포스트 ID (예 : 434028623322619_685556731503139)를 사용하여 게시물을 공유 할 수있는 방법이 아니면 무엇을하고 feedDialog가 필요한 정보를 잡아시키는가? 나는 웹 공유기와 동일한 무엇을 의미
, 당신은 링크와 페이스 북 (자책골 또는 긁어를 통해) 페이지의 정보를 잡아하려고