如何获得付费和免费版本的iOS应用程序共享FB App ID? [英] How to have a paid and free version of iOS app share FB App ID?

查看:115
本文介绍了如何获得付费和免费版本的iOS应用程序共享FB App ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有相同iPhone应用的免费和付费版本。我希望他们分享Facebook App ID,因为它们本质上是相同的应用程序。我以为我可以通过Facebook类使用这个方法来实现这一点。

I have a free and a paid version of the same iPhone app. I would like for them to share a Facebook App ID since they are essentially the same app. I thought I could accomplish this by using this method from the Facebook class.

- (void)authorize:(NSArray *)permissions localAppId:(NSString *)localAppId

然而,其中一个应用程序的登录总是失败(在我的情况下)似乎原因是在Web界面中创建的Facebook应用程序要求提供应用程序包ID和App Store ID。显然,我的应用程序的免费版本和付费版本不能具有相同的软件包ID或应用程序ID,所以我该如何才能使这项工作?

However, login always fails for one of the apps (in my case the free version) and it would seem that the reason is that the Facebook app created in the web interface asks for an App Bundle ID and App Store ID. Obviously the free version and paid version of my apps cannot have the same bundle id or app id so how can I make this work?

Facebook.m中的文档建议我可以使用上面提到的授权方法:

The docs in Facebook.m suggest that it is possible with the authorize method I mention above:

/*
 * ...
 * @param localAppId
 *            This is useful if your have multiple iOS applications that
 *            share a single Facebook application id (for example, if you
 *            have a free and a paid version on the same app) and you want
 *            to use SSO with both apps. 
 * ...
 */

谢谢。
- Alex

Thanks. - Alex

推荐答案

你可以让它发挥作用。每个应用程序必须有不同的网址方案(因为这是Facebook重定向回您的应用程序的方式)。

You can make it work. Each app must have different url schemes (since that is how Facebook redirects back to your app).

您必须支持的示例网址方案:
(您的Facebook应用程序) ID: fb123456789)

Example url schemes you must support: (Your facebook app id: "fb123456789")

<强>如果不设置localAppId: fb123456789(localAppId =无)

Without setting localAppId: "fb123456789" (localAppId = nil)

<强>免app URL方案: fb123456789lite(localAppId = 精简版)

Free app url scheme: "fb123456789lite" (localAppId = "lite")

付费应用网址方案:fb123456789pro(localAppId =pro)

Paid app url scheme: "fb123456789pro" (localAppId = "pro")

来自评论:


localAppId是一个小写字母字符串,附加到用于SSO的
基本URL方案。例如,如果你的Facebook ID为
350685531728 和你设置localAppId为 ABCD,Facebook的应用程序将
期待您的应用程序绑定到下列URL方案:
fb350685531728abcd 。

localAppId is a string of lowercase letters that is appended to the base URL scheme used for SSO. For example, if your facebook ID is "350685531728" and you set localAppId to "abcd", the Facebook app will expect your application to bind to the following URL scheme: "fb350685531728abcd".

这篇关于如何获得付费和免费版本的iOS应用程序共享FB App ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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