我们可以使用android?
通过Facebook SDK将管视频上传到Facebook帐户墙请举个例子?
答案 0 :(得分:0)
private UiLifecycleHelper uiHelper;
if (FacebookDialog.canPresentShareDialog(getApplicationContext(),
FacebookDialog.ShareDialogFeature.SHARE_DIALOG)) {
String link = "<-GET YOUR YOUTUBE LINK HERE";
// Publish the post using the Share Dialog
FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(
this)
.setName(Id)
.setLink(link)
.build();
uiHelper.trackPendingDialogCall(shareDialog.present());
}
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
uiHelper.onActivityResult(requestCode, resultCode, data,
new FacebookDialog.Callback() {
@Override
public void onError(FacebookDialog.PendingCall pendingCall,
Exception error, Bundle data) {
Log.e("Activity",
String.format("Error: %s", error.toString()));
}
@Override
public void onComplete(
FacebookDialog.PendingCall pendingCall, Bundle data) {
Log.i("Activity", "Success!");
}
});
}