【问题标题】:Facebook and twitter auto share to user account? [closed]Facebook 和 twitter 自动分享到用户帐户? [关闭]
【发布时间】:2013-03-13 02:29:48
【问题描述】:

我想从我的 iPhone 应用程序中自动共享一个社交媒体用户帐户(没有对话框、取消选项、发送选项)。我该怎么做。

【问题讨论】:

  • 没关系,我的问题有什么问题,你为什么要降低我的观点?
  • @H2CO3 你无权像这样评论别人。

标签: iphone ios facebook social-media


【解决方案1】:

不要使用对话框,而是使用doGraphPost分享你的东西

使用此方法在fb上分享,无需打开对话框

 <FbGraphResponse_Obj> = [fbGraph doGraphPost:@"me/feed" withPostVars:<NSMutableDictionary>];

在此处详细查找:

// Invoke fbGraphCallback & prepare fbArray..

// preapare conent to be posted, add following snippet in same function

    NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:4];
    [variables setObject:@"Yours content to be shared" forKey:@"message"];


    // share prepared content to fb
    fb_graph_response = [fbGraph doGraphPost:@"me/feed" withPostVars:variables];
    NSLog(@"postMeFeedButtonPressed:  %@", fb_graph_response.htmlResponse);


where fb_graph_response is an instance of FbGraphResponse

享受编程!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-07-04
    • 2012-04-25
    • 2011-11-10
    • 2023-01-15
    • 2011-11-08
    • 2023-02-15
    • 2013-04-20
    • 2011-05-13
    相关资源
    最近更新 更多