菜鸟教程小白 发表于 2022-12-12 11:00:17

iOS6 社交框架 : posting to multiple networks without the UI


                                            <p><p>在我的应用程序中,我希望允许我的用户在 Facebook 和 Twitter 上发布一个状态。我有自己的撰写窗口,所以我想避免使用内置的 <code>SLComposeViewController</code>,因为它不是必需的。</p>

<p>在我的搜索中,我没有找到任何关于如何使用 iOS6 的东西直接发布到 Twitter 或 Facebook 的好的教程,这些都是内置的 Composer ,而且这些文档在我疲倦的眼睛里显得有些迟钝.</p>

<p>任何指向教程、示例代码,甚至是正确方向的指针都将不胜感激。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>从 <code>ACAccountStore</code> 获取用户的 Twitter 和 Facebook 帐户,然后对 <code>SLRequest</code> 进行两次调用——一个用于您的 Twitter 帖子,另一个用于 Facebook。</code> p>

<p>这里是 <a href="http://developer.apple.com/library/ios/#documentation/Social/Reference/SLRequest_Class/Reference/Reference.html" rel="noreferrer noopener nofollow">class reference</a>对于 <code>SLRequest</code>。</p>

<p>查看 <a href="https://stackoverflow.com/questions/12757449/how-to-integrate-facebook-in-ios-6-using-slrequest" rel="noreferrer noopener nofollow">Facebook</a> 的这些示例和 <a href="https://dev.twitter.com/docs/ios/making-api-requests-slrequest" rel="noreferrer noopener nofollow">Twitter</a> .</p>

<p>另外值得注意的是,Facebook 有自己的 <a href="https://developers.facebook.com/ios/" rel="noreferrer noopener nofollow">SDK alternative</a>到 <code>SLRequest</code>,它允许对请求进行更多自定义,以包括 <a href="https://developers.facebook.com/docs/technical-guides/fql/" rel="noreferrer noopener nofollow">FQL</a> , <a href="https://developers.facebook.com/docs/howtos/batch-requests-ios-sdk/" rel="noreferrer noopener nofollow">batch requests</a>等。根据您的要求的具体情况,您可能需要检查一下。</p></p>
                                   
                                                <p style="font-size: 20px;">关于iOS6 社交框架 : posting to multiple networks without the UI,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/16661652/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/16661652/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: iOS6 社交框架 : posting to multiple networks without the UI