2
當你意圖它會自動嵌入YouTube播放器到您的牆壁上FB分享的YouTube鏈接,它看起來像這樣發佈使用Facebook SDK嵌入的YouTube鏈接
但是......當我嘗試使用FB sdk發佈相同的視頻,HelloFacebookSampleActivity =>postStatusUpdate()
mathood。
public void postStatusUpdate() {
if (user != null && hasPublishPermission()) {
final String message ;
message = (user.getFirstName()+" "+ getString(R.string.status_update_link)+ " " +video_id + " " + getString(R.string.google_play_link));
Request request = Request
.newStatusUpdateRequest(Session.getActiveSession(), message, new Request.Callback() {
@Override
public void onCompleted(Response response) {
showPublishResult(message, response.getGraphObject(), response.getError());
}
});
request.executeAsync();
} else {
pendingAction = PendingAction.POST_STATUS_UPDATE;
}
}
它看起來像這樣
所以我覺得this link是爲了從http://www.youtube.com/watch?v=<code>
鏈接格式更改爲http://www.youtube.com/e/<code>
或<code>
後添加&autoplay=1
但它不工作...我google搜索「臉譜android嵌入式鏈接youtube」,但沒有發現這個問題,需要幫助
如何我張貼使用Facebook SDK嵌入的YouTube鏈接(比如圖一)?
UPDATE:
將我的代碼,我現在正在使用Publish to Feed代碼。但問題沒有解決
我嘗試post通過像Facebook豪宅源,但它不工作...
postParams.putString("name", "Facebook SDK for Android");
postParams.putString("caption", "Build great social apps and get more installs.");
postParams.putString("description", "The Facebook SDK for Android makes it easier and faster to develop Facebook integrated Android apps.");
postParams.putString("source","http://www.youtube.com/e/2raioEC7Hms");
u能交詳細的程序。 –