iOS Facebook集成 [英] iOS Facebook Integration

查看:108
本文介绍了iOS Facebook集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发简单的Facebook集成,允许用户将高分发布到他们的墙上。 doodlejump处理这个的方式是我的灵感。我有它的功能,但它不是很干净,我不知道该怎么做。

I am working on simple facebook integration that allows users to post high scores to their wall. The way doodlejump handles this is my inspiration. I have it functioning, but it's not very clean and I'm not sure what to do.

我按照 http://developers.facebook.com/docs/guides/mobile 。你做的第一件事就是打电话给 [facebook authorize:nil delegate:self] 。之后,您可以拨打 [facebook dialog:@feedandParams:params andDelegate:self] 向用户留言。我有两个问题。

I followed the instructions at http://developers.facebook.com/docs/guides/mobile to get up and running. One of the first things it has you do it call [facebook authorize:nil delegate:self]. After that you can call [facebook dialog:@"feed" andParams:params andDelegate:self] to make a post to the users wall. I have two issues with this.

首先,当你打电话给授权时,它退出你的应用程序,因为这是Facebook新的理想方法,作为单一登录的一部分( OSS)。没关系,即使用户已经登录,我的应用程序仍在执行此操作。我没有办法检查用户是否已经登录。

First, when you call authorize it exits your app as that is facebook's new desired methodology as part of "One Single Sign-On" (OSS). That ok, what isn't ok is that my app is doing this even if the user is already signed on. I do not see a way to check if the user is already signed on.

第二个问题是它退出我的应用程序以授权我的应用程序向Facebook发布内容。退出应用程序以登录Facebook似乎是可以接受的。大多数用户已经这样做了,所以没什么大不了的。但是我的应用程序不应该只是为了获得用户授权发布内容而退出。 DoodleJump不会这样做,但我不确定如何。

The second issue is that it exits my app to authorize my app to post something to facebook. It seems acceptable to exit the app to sign on to facebook. Most users will have already done this, so no big deal. But my app should not have to exit just to get user authorization to post something. DoodleJump doesn't do that but I'm not sure how.

我尝试挖掘旧帖子,但SDK已经改变,因此很多都不再有效。谢谢。

I tried digging through old posts but the SDK has changed so a lot of them are no longer valid. Thanks.

推荐答案

基于最新的Facebook SDK(位于 Github )这是我确定这是预期行为的例子。

Based on the latest Facebook SDK (located at Github) and it's example I have determined that this is the expected behavior.

它是建成的围绕新的快速应用程序切换,所以看起来就是这样。

It is built around the new fangled "fast app switching" so it looks like that is just what happens.

有点蹩脚的imo但是如果那是Facebook工程师确定的最佳流程那么就是这样吧。

A little lame imo but if that's what Facebook engineers have determined to be the optimal process then so be it.

这篇关于iOS Facebook集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆