Authentication 3 SDK PHP and JS?

Translate Request has too much data
Parameter name: request
Translate Request has too much data
Parameter name: request

jomofcwNew MemberFrom: FRANCERegistered: 2010-11-02Posts: 38Website

Hi,

Just to be sure : the online JS SDK can't be use with PHP SDK 3.0.1 to authenticate user at the moment ?
getUser(); ?> always return me 0...

Best regards,

jomofcwNew MemberFrom: FRANCERegistered: 2010-11-02Posts: 38Website

Thanks ShawnsSpace ! I'll be waiting for it so.

DanielXPNew MemberRegistered: 2011-07-10Posts: 12

I've just got the PHP one on my site, I don't want it to redirect over to facebook, i would prefer the JS version with the popup (but need the php side).

Do i need to wait until the 20th til i can do this?

jomofcwNew MemberFrom: FRANCERegistered: 2010-11-02Posts: 38Website

Nop, you just have to use the old PHP SDK 2.x.
And that's OK.

DanielXPNew MemberRegistered: 2011-07-10Posts: 12

Will the PHP 3.x SDK work with javascript in the same way after the 20th?

jomofcwNew MemberFrom: FRANCERegistered: 2010-11-02Posts: 38Website

Kind of yea, you'll just have to change few PHP code.

jomofcwNew MemberFrom: FRANCERegistered: 2010-11-02Posts: 38Website

Hello,

Update is OK, but it doesn't work anymore hmm.
Using the PHP-SDK V3 I cant get the user (who login using the new Javascript SDK oauth), it always return me 0.

How to please ?

murmax82New MemberRegistered: 2011-07-22Posts: 1

The same thing with mine. They don't work together. I mean PHP-SDK V3 and new JavaScript SDK  sad

muckingerNew MemberRegistered: 2010-05-03Posts: 18

Same for me, i tested to use php-sdk and js-sdk together, but php can't read the login-status, if you have logged in with the js-sdk. I think it's because of the Cookie-Less Method of the JS-SDK.

We really need an example from Facebook how to use both together. It must work as mentiond here:
https://developers.facebook.com/blog/post/503

"If you are using the JavaScript SDK for login in conjunction with the PHP SDK, you will want to wait for the JavaScript SDK upgrade".....

jomofcwNew MemberFrom: FRANCERegistered: 2010-11-02Posts: 38Website

From Cat Lee · Program Manager, Developer Relations ?  Facebook
"Hi Nicolas - We are updating the PHP SDK next week to be new-cookie-format aware. I'll update the post. Thanks for your patience"

nyndesignsNew MemberFrom: CanadaRegistered: 2011-07-28Posts: 4Website

Any updates for this?

My connect applications have been virtually unusable in regards to this issue.

windingwormNew MemberRegistered: 2011-07-31Posts: 4

Hi everyone (1st message!),

So just to confirm, cause I've recently contributed to the blog comments but I still haven't got any answer:

Like you all, I'm trying to mix Javascript SDK for authentication and PHP SDK 3 for API calls, but getUser (PHP SDK part) always returns 0, no matter I enable Oauth2 in JS SDK (oauth = true + reponse.authResponse) or not (with reponse.session and no oauth parameter).

Is it normal? or should it happen only when I try to enable Oauth2?

Actually I understand that the PHP SDK update will make it aware of the new JS SDK cookie format (Oauth2). But it should already read the JS SDK version without oauth:true nope? or I missed something...

Thanks for you answers guys wink

W.

huiningNew MemberRegistered: 2011-08-01Posts: 5

I'm also waiting for an example. Any1 got it to work yet?

Project deadline is approaching... and yet there's nothing I can do about this... >.<

windingwormNew MemberRegistered: 2011-07-31Posts: 4

Yes sure, an example would be great.

However, if you're able to properly authenticate a user (if facebook adds the app to user's list), then a simple PHP SDK require and a getUser call should be enough to test whether it works or not.
It's not the case for me (getUser returns 0), that's why, I repeat my question since it's not so clear in the doc:

It seems that PHP SDK 3 has been made to be JS SDK compliant.
However, there is 2 different ways to use JS SDK: with Oauth2 (oauth parameter enabled in FB.init), or without Oauth2.
My experience is that it doesn't work, no matter if I enable Oauth2 or not.

So should it work without Oauth2? Because if not, I still don't get why Facebook released a PHP SDK 3 whereas one of its main goals was to be new JS SDK compliant (and so far, new Oauth2 is just an option in JS SDK)....

Hope I'm clear...

W.

muckingerNew MemberRegistered: 2010-05-03Posts: 18

Hi everyone (1st message!),

So just to confirm, cause I've recently contributed to the blog comments but I still haven't got any answer:

Like you all, I'm trying to mix Javascript SDK for authentication and PHP SDK 3 for API calls, but getUser (PHP SDK part) always returns 0, no matter I enable Oauth2 in JS SDK (oauth = true + reponse.authResponse) or not (with reponse.session and no oauth parameter).

Is it normal? or should it happen only when I try to enable Oauth2?

Actually I understand that the PHP SDK update will make it aware of the new JS SDK cookie format (Oauth2). But it should already read the JS SDK version without oauth:true nope? or I missed something...

Thanks for you answers guys wink

W.

The promised PHP-SDK Version, that will work together with JS-SDK & oAuth 2.0, isn't released yet :-(

So at the moment you have to use the old 2.1.2 Version of the PHP-Sdk (https://github.com/facebook/php-sdk/commits/v2.1.2) together with JS-SDK WITHOUT enabling oAuth 2.0.

huiningNew MemberRegistered: 2011-08-01Posts: 5

The promised PHP-SDK Version, that will work together with JS-SDK & oAuth 2.0, isn't released yet :-(

So at the moment you have to use the old 2.1.2 Version of the PHP-Sdk (https://github.com/facebook/php-sdk/commits/v2.1.2) together with JS-SDK WITHOUT enabling oAuth 2.0.

Oic, if I use the old 2.12 version, will it be troublesome to change to the new version later?
Do you know when it will be released?

Thanks.

muckingerNew MemberRegistered: 2010-05-03Posts: 18

The promised PHP-SDK Version, that will work together with JS-SDK & oAuth 2.0, isn't released yet :-(

So at the moment you have to use the old 2.1.2 Version of the PHP-Sdk (https://github.com/facebook/php-sdk/commits/v2.1.2) together with JS-SDK WITHOUT enabling oAuth 2.0.

Oic, if I use the old 2.12 version, will it be troublesome to change to the new version later?
Do you know when it will be released?

Thanks.

The new PHP-SDK Version, that works together with the new oAuth 2 JS-Sdk, should have released last Friday. See my post about that here: http://forum.developers.facebook.net/viewtopic.php?pid=364874#p364874

And sure, when the new Version is released, you have to change again your code :-(

windingwormNew MemberRegistered: 2011-07-31Posts: 4

The promised PHP-SDK Version, that will work together with JS-SDK & oAuth 2.0, isn't released yet :-(

So at the moment you have to use the old 2.1.2 Version of the PHP-Sdk (https://github.com/facebook/php-sdk/commits/v2.1.2) together with JS-SDK WITHOUT enabling oAuth 2.0.

Thanks for your answer muckinger wink

But I still don't get why they released this PHP SDK 3 without any compatibility with the current new JS SDK whereas it was its initial purpose...

Anyway, this is another debate ^^

Let's code under the 2.1.2 then... and change it on Friday (if they're on time...) tsss

W.

nyndesignsNew MemberFrom: CanadaRegistered: 2011-07-28Posts: 4Website

/bump

Officially Friday - Has anyone heard any news on this?

shahjashua0New MemberRegistered: 2011-08-06Posts: 5

the only thing you got to do is just use the folow link this is theat
getUser(); ?> always return me 0...