Blackberry Facebook prob: Could not select proper Transport decriptor - facebook

I am using Blackberry Facebook SDK (FacebookBlackBerrySDK-v0.8.25.jar) for facebook integration for my app. I am using the following code.
ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS);
Facebook fb = Facebook.getInstance(as);
User user = fb.getCurrentUser();
I have tested the app in simulator of OS 5.0 and device and simulator of OS 6.0. it is working fine. But when I am testing the same in a device of OS 5.0, it is giving "Could not select proper Transport descriptor". What may be the problem behind it? Is it related to the device? How to solve the problem?

Download the SDK source code and change the ConnectionFactory parameters in com.blackberry.util.ui.BrowserScreen.

Related

Default FBSDKLoginBehavior.Native not working on iOS 9

I just upgraded my app to Xcode 7 / Swift 2.0 and I'm struggling with the Facebook Login via AppSwitch. I'm on the latest FBSDK (4.6) and did everything according to the upgrade guide. Still, on iOS9 the Facebook login happens via in-app browser, the appswitch doesn't work anymore. I also tried force setting the loginbehavior but without luck:
let manager = FBSDKLoginManager()
manager.loginBehavior = FBSDKLoginBehavior.Native
manager.logInWithReadPermissions(facebookReadPermissions, fromViewController: nil, handler: { (loginResult, error) -> Void in
Is there anything I can do to make appswitch work again?
Thanks!
Turns out that this is not an issue but the new desired behavior according to these posts from Facebook:
https://developers.facebook.com/bugs/1636969533209725/?comment_id=1011596265571252
This behavior is by design. In our latest iOS SDKs, the login behavior is now controlled on the server side in order to ensure the best user experience.
https://developers.facebook.com/bugs/786729821439894/?comment_id=1467419033584031
Because of introduced changes in iOS 9, This new behavior avoids the user to be asked if they want to go and open the Facebook Application, accept the permissions/share/etc, and then ask once more if they want to switch back to your app.
https://developers.facebook.com/bugs/1390559277910338/?comment_id=1661064587442645
System authentication doesn't give people control over the information they share with apps. And in iOS 9, fast-app-switching to the Facebook native app results in additional dialogs ("ExampleApp would like to open Facebook") which appear twice - once on the way from ExampleApp to Facebook, and once again on the return journey. We believe the default SDK behavior in v4.6 on iOS 9 offers the best experience to people logging into your app with Facebook.
You can patch FacebookSDK source code to use Fast App Switching.
The interesting part (for tag 4.6) is in file FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfigurationManager.m
+ (FBSDKServerConfiguration *)_defaultServerConfigurationForAppID:(NSString *)appID
{
…
BOOL useNativeFlow = ![FBSDKInternalUtility isOSRunTimeVersionAtLeast:iOS9Version];
As you can see, it disables native flow on iOS9+.
Changing the line to something like BOOL useNativeFlow = YES; should work.
P.S. I didn't check this patch myself yet.

unity3d 4.3 facebook SDK login

hi i have unity3d and the latest facebook sdk
i've downloaded the sample project but i got a problem, when i start the project and click login, unity immediately show this images:
which i expecting i've got an error from this part of code in mainmenu.cs
if (FB.IsLoggedIn)
{
string panelText = "Welcome ";
if (GameStateManager.Username != null) panelText += GameStateManager.Username + "!";
else panelText += "Smasher!"; //I GOT THIS ELSE BLOCK !
if (GameStateManager.UserTexture != null)
GUI.DrawTexture( (new Rect(8,10, 150, 150)), GameStateManager.UserTexture);
GUI.Label( (new Rect(179 , 11, 287, 160)), panelText, MenuSkin.GetStyle("text_only"));
}
which is my gamestatemanager.username is null... i just want to know why my gamestatemanager.username is null, how to get some data to fill that.. i've followed step to fill gamestatemanager.username in this link where's my error btw ? anyone can help ?
Please see this question. Unity Facebook SDK Login Always Returns User 0 Access Token abc...z We don't support the editor or desktop yet. You will have to run on an ios or android device, or publish your app to facebook canvas.
I think you are having the same problem I am...
It seems it has logged you in but returns USerID:0 and Access Token: abcdefghijklmnopqrstuvwxyz
I think this is a TEST User that is automatically logs in but I can't seem to find out how to turn that off and to actually have it log ME on.
Is your APP in Sandbox mode? I tried turning my sandbox mode in the facebook app settings off but it didn't seem to effect it...
Waiting for an answer on this and my related question...
Unity Facebook SDK Login Always Returns User 0 Access Token abc...z
If you are running this from the EDITOR then the reason is the EDITOR does not actually log you in.
If you are running from the device...I am still working on that one (also getting the same result you are)

Disabling automatic message box on ShareKit on IOS

we trying to disable the automatic message box when we authenticate twitter on an Ios App. We click connect, once it's authenticated, it opens up a message box. We just want to connect, thats it without the box. Anyone came across this?
It is simple, just do not share, only authorize:
SHKTwitter *twSharer = [[SHKTwitter alloc] init];
[twSharer authorize];
[twSharer release];
If you wish to get authorised user info (in the form of dictionary in NSUserDefaults), such as username run
[SHKTwitter getUserInfo];
for more info see ShareKit 2.0 FAQ
Mentioned behaviour is corresponding with pre iOS 5 implementation. If you use iOS 5 everything is handled by native iOS Twitter framework

Facebook cookie issue in IE9 and Chrome and FacebookWebClient initialization

I am playing with Facebook C# SDK to use with ASP>NET application, and was using FacebookWebContext.Current.IsAuthorized method after login on client side with JavaScript SDk to procceed with further actions (retrieve user info, friends list,etc). It was working on beginning but suddenly stop about week ago. FacebookWebContext.Current.IsAuthorized method is always false now. Checking further found that its working in Safari and Firefox 4, but fails in IE9 and Chrome.
It seems that IE9 doens't see facebook cookie like fbs_ApplicationID. Testing different examples in JavaSDk console on Facebook site shows that Facebook FB.Cookie.load method doesn't return any value in IE9 and Chrome.
So my question, is there other way to "auhtorize" application on a server side using SDk? Is that Facebook side issue specific to browsers? FB.login callback function does return session info, but how I can use it then on server side to activate FacebookWebClient?
I have the same problem, but the behavior is very odd. It was working yesterday and now not working in Chrome and IE9. The fbWebContext.AccessToken is null and there's no fbs_xxxxx cookie. It's fine in Firefox and Safari.
Here's my code:
var fbWebContext = FacebookWebContext.Current;
var app = new FacebookWebClient(fbWebContext);
dynamic fbUser = app.Get("me");

How to use Facebook accessToken from an iOS app to use in Rails / Facebooker

I'm using iOS SDK to do Facebook Connect in an iPhone application, I can successfully login in and get the accessToken from the Facebook instance but I'm not able to use it from a rails/facebooker.
I do the call on the iPhone app:
NSString * url = [NSString stringWithFormat:#"http://localhost:3000/fb_login?access_token=%#",[self.facebook accessToken],nil];
I'm passing the accessToken to an action on the rails app like this:
#auth_token comes from the iOS SDK.
facebook = Facebooker::Session.create('app_key','secret_key')
facebook.secure!(:auth_token => auth_token)
but I get Facebooker::Session::MissingOrInvalidParameter: "Invalid parameter"
Any thoughts? Thanks in advance.
Perhaps it's because facebooker uses the old Facebook Connect authentication method. You may need to use the official facebook gem.
$ gem install facebook
But, I am not familiar with facebooker specifically, so I could be wrong!