1

is it possible to modify the follow standard code for posting a facebook feed thru ios to have a youtube clip instead of a picture? Just like one posts a youtube link on his/her wall through the browser where you can click and view the video without leaving the page. I would still like to keep a separate link that is not the youtube video link if possible though.

Tried searching but seems like not much questions asked on posting youtube video through the SDK... Thanks much in advance!

NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   @"http://www.somedomain.com/pic.png", @"picture",
                                   @"http://www.somedomain.com", @"link",
                                   @"Post Name", @"name",
                                   @"Post Caption", @"caption",
                                   @"Message", @"description",
                                   nil];

[facebook dialog:@"feed" andParams:params andDelegate:self]
4

2 に答える 2

2

理解した。「ソース」にビデオリンクを追加します(swfに直接リンクするURLの形式に注意してください)。また、フラッシュビデオの場合は「画像」も含める必要があるという難しい方法(ダイアログでエラーが発生)を発見しました。ここで使用されるURLは、YouTubeビデオの一般的な画像です。

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   @"__MY_APP_ID__", @"app_id",
                                   @"http://google.com", @"link",
                                   @"http://www.youtube.com/v/hpP7wvMqGYU", @"source",
                                   @"http://img.youtube.com/vi/hpP7wvMqGYU/0.jpg", @"picture",
                                   @"myName", @"name",
                                   @"myCaption", @"caption",
                                   @"myDescription", @"description",
                                   nil];

    [facebook dialog:@"feed" andParams:params andDelegate:self];
于 2012-06-07T18:25:18.707 に答える
0

私はここSOでこの質問を見つけました。これはあなたが探しているものですか?

    NSString *video_link = @"http://www.youtube.com/v/#####";
    NSString *image_link = @"http://i.ytimg.com/vi/#####/2.jpg";

    NSDictionary *video_share = [NSDictionary dictionaryWithObjectsAndKeys:
                                 @"flash",      @"type",
                                 video_link,    @"swfsrc",
                                 image_link,    @"imgsrc",
                                 @"100",        @"width",
                                 @"80",         @"height",
                                 @"400",        @"expanded_width",
                                 @"320",        @"expanded_height",
                                 nil];

Facebookで公開されたビデオ-iPhoneのFacebookアプリでSDKが再生されない

于 2012-06-07T14:03:17.513 に答える