最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Using Facebook's API to post a video using the feed dialog fails - Stack Overflow

programmeradmin7浏览0评论

I'm trying to post a video to a user's timeline using Facebook's feed dialog. When I use the javascript SDK with:

FB.ui({
     method:'feed',
     name: 'testing',
     link: '',
     picture: '.jpg',
     source: ''
});

I get:

And this is missing the thumbnail and video player. I tried adding type: 'video' to the parameters and I also tried replacing the source parameter with a direct link to the .swf file, but that didn't help. I'm not sure if this is a bug or if I'm doing something wrong. Any ideas?

I'm trying to post a video to a user's timeline using Facebook's feed dialog. When I use the javascript SDK with:

FB.ui({
     method:'feed',
     name: 'testing',
     link: 'http://www.facebook.',
     picture: 'http://img.youtube./vi/1CE6W5BubQo/0.jpg',
     source: 'http://www.youtube./watch?v=1CE6W5BubQo'
});

I get:

And this is missing the thumbnail and video player. I tried adding type: 'video' to the parameters and I also tried replacing the source parameter with a direct link to the .swf file, but that didn't help. I'm not sure if this is a bug or if I'm doing something wrong. Any ideas?

Share Improve this question asked Dec 27, 2013 at 9:42 JohnnyJohnny 7,36110 gold badges51 silver badges79 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

Do like that:

FB.ui(
  {
    method: 'feed',
    name: 'testing',
    link: 'http://www.facebook.',
    picture: 'http://img.youtube./vi/1CE6W5BubQo/0.jpg',
    //caption: '',
    description: '',
    source: 'https://www.youtube./v/1CE6W5BubQo?version=3&autohide=1&autoplay=1'
  },...

maybe try this.

change your source

http://www.youtube./watch?v=1CE6W5BubQo

into this

https://youtube.googleapis./v/1CE6W5BubQo

and

url or link to https://youtube.googleapis./v/1CE6W5BubQo

This is by design as per facebook --

https://developers.facebook./bugs/589975484398226?browse=external_tasks_search_results_526fc388b99e18881434478

I am still trying to figure out a way out of this .

发布评论

评论列表(0)

  1. 暂无评论