FBSDKLog: Cannot use the Facebook app or Safari to

2019-01-04 02:09发布

I want to have the Facebook app native dialog login (https://developers.facebook.com/docs/technical-guides/iossdk/login/#fbnative).

In the console, I get the following message when clicking on the FBLoginView:

FBSDKLog: Cannot use the Facebook app or Safari to authorize, fb**** is not registered as a URL Scheme

Yet I did exactly as here: Failing to open active session after updating Facebook SDK to 3.5

10条回答
等我变得足够好
2楼-- · 2019-01-04 02:28

I Had the same problem (Facebook SDK 3.5.1)

My URL scheme for Facebook was on Item 1. Problem fixed by moving it to Item 0.

查看更多
劫难
3楼-- · 2019-01-04 02:29
爷、活的狠高调
4楼-- · 2019-01-04 02:29

I have same problem. So, i try copy item 0 : fb1234567890 to item 1 : fb1234567890

Array URL Schemes have 2 item: item 0, item 1 It's OK. hope it good for you!

查看更多
forever°为你锁心
5楼-- · 2019-01-04 02:30

The problem is in the plist file as it needs different settings then it was published in official Facebook video and articles for Facebook SDK 3.5.x.

If you'd like to use 2 or more apps with the same Facebook AppID - which is useful as all the activity, posts will cumulate under the same Facebook appearance for all version like premium or lite - but in this case you have to solve somehow that Facebook calls back (URL scheme) the correct app from where the user came from and the user could continue to use our app when finished with the Facebook activity, like post etc.

So we have to use URL types and URL Schemes in the Xcode and in the Facebook Developer settings as you can see on the illustrations below:

UPDATE 2015

I have updated the screenshots to reflect the new Facebook and Xcode settings:

Xcode 6

As you can see you have to use the FacebookAppID with the attached URL Scheme Suffix and the same FacebookDisplayName BUT you have to use the "fb" prefix in the URL types-->URL Schemes line and use the FacebookDisplayName in the Identifier line, see below. This will ensure that Facebook will call back the correct app (lite or premium in this example) but all the post etc will go to the same Facebook app.

enter image description here

Facebook

iPhone Store ID is for the premium version as we'd like to route the user to the paid version!

enter image description here

查看更多
女痞
6楼-- · 2019-01-04 02:32

My issue was that I had the FBAppID pasted in 3x times and it was only apparent by inspecting the .plist file with a text editor.

查看更多
乱世女痞
7楼-- · 2019-01-04 02:32

I have used Facebook SDK v.3 or more, I have found problem with open Facebook Login. when I click on the Login button then not open the popup screen for user Login.

So, below is the solution for this issue :

When I change the system Date & Time from previous to the current and again check the application and it's works perfect. so please check the device's Date & Time.

查看更多
登录 后发表回答