2013-03-23 62 views
1

我想从我的iPhone应用程序中自动共享社交媒体用户帐户(无对话框,取消选项,发送选项)。我可以怎么做。Facebook和Twitter的自动分享到用户帐户?

+0

没关系,我的问题出了什么问题,你为什么减少我的观点? – 2013-03-23 06:13:45

+3

@ H2CO3你无权对此类其他人发表评论。 – Abha 2013-03-23 06:18:47

回答

7

而不是使用对话框,共享使用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 

享受编程!

相关问题