I was using classic Auth without any problem while I want to put some social button.
With Facebook or G+ button, I see no image on the share card create by the button... after some inspection, I realized CakePHP seems to block opengraph requests.
Open Graph Object Debugger says "error 200" and I suppose the cakephp Auth component blocked it.
But, in my first controlleur, every action are granted ($this->Auth->allow();) but nothing change....
How can I authorize Opengraph requests with the cakephp Auth component?
In fact, the problem was cause by the Gzip compression used by the server.
Disable this feature (with .htaccess) resolve the problem...
Related
Im trying to setup and webhook for facebook leads, i've followed the tutorial that is given. Everything works fine and all the verification steps through the Graph explorer are "OK". My endpoints seams to live and working.
But when i try the Lead Ads Testing Tool and make an request to send the form i get the status "404 rejected"
I have verified that the callback url is correct, both via the Graph explorer and the webinterface on developer.facebook.com under the tab "Webhooks"
I have logs on the server so i can see all types of requests done to the url, empty or not and i don't even get an request. I've tried to rule out every possible "auth" problems.
So i'm stuck guys, what is missing? What i'am doing wrong?
On my website I use the facebook javascript SDK to initialize and login the user, and later once the user has responded to the survey and submitted it on the website, i fetch the facebook user on the server side using facebook PHP SDK. This works great, except for the case when the user connects to my app then leaves the page open for a while, to later comeback and attempt submit the survey. If the user waits long enough, I will get the "This authorization code has expired" error on the PHP server side, i'm not sure how to solve this.
Is there some way to refresh the authorization code through javascript SDK? I assume it is generated on FB.init. The optimal thing would be if i could make a check before the submit to see if the authorization code is still valid, then if not i would refresh it and fire the submit event.
One way to solve this may be to use FB.getLoginStatus of the JavaScript right before the server call - it refreshes the Access Token and you can get it in the response:
https://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus
Ok so I am wanting to add the ability for users to use their facebook accounts to register to a site. I have gone through the dev files and various tutorials online. The issue is that no matter what method I follow I have yet been able to get it to work.
I have tried using source from here as well:
http://www.masteringapi.com/tutorials/how-to-use-facebook-registration-plugin-as-your-registration-system/15/
Is there some dependency that I need for the site, some other system for facebook to load right?
Here is the test version of the site: http://ohmsgaming.com/Misc/nstdt/v2/
Your page show an error like "'redirect_uri' should be an absolute url."
Use absolute Uri in redirect Url field of request query to fix the issue.
You can use Open Authentication technique to set up authentication system in your site. And once the user is authenticated you will get the publicly shared information of the user. This information can be registered in website at first login.
I successfully implemented the same in http://www.nowrunning.com using brickred's social auth code.
http://code.google.com/p/socialauth/wiki/GettingStarted
I'm getting into the grimy guts of a problem that has turned out to be rather cumbersome so I turn to you, the experts, for help.
what I've done so far: I am building an iphone app with phonegap. I am using the provided fbconnect (in phonegap github) code which gives some rather convenient javascript based example code to build things like a comment and check in request. I have comments and checkins fully working how I want, and I have an auth_token that I am successfully toting around.
enter the like button: I understand that you cannot make like requests via xmlhttprequest in the same way that you can with comments for example, so I am stuck using an iframe (unless there is a better alternative).
what I need help with: right now, since the iframe is triggering its own login, I have the situation where the user might log in to like, and then have to log in again to comment which is not a viable. Is there a way to pass a valid auth token to the iframe so the user wont be prompted to log in again or some other sneaky way to authorize through the childbrowser solution that I have currently implemented and then share the auth token to the rest of the app?
notes: I havent passed an app ID to my auth implementation but I noticed that the iframe does pass an app ID. would including an app ID in my auth request somehow link the logins so facebook could recognize that the user is already logged in through the app?
I can't think of any specific code to include since this is more of a general question but if there is anything you'd like to have a look at please let me know.
The short answer is no, mainly for security and spam prevention. The only way to have the user like your page is rendering the iframe code in a webview. This requires a traditional email/password login with Facebook. Using the graph api is the only way to use things like commenting and checkins, and this requires a user to login via a separate mechanism and then subsequently approve your app. There is no back door logging in mechanism.
I have a ASP.NET web site which uses Facebook Connect for authentication - using the JavaScript API and the Facebook Connect FBML Button.
Here is the regular flow of events for a "Connect with Facebook" button click, when user isnt logged into Facebook.
Dialog is shown requesting user to login
Dialog requests permission from the user for basic info permission
The popup is closed
The callback function i supplied for "onlogin" is fired.
All good.
Now - here's what i think is a bug: the user is already authenticated to Facebook, but has not authorised my app.
This is the flow:
Dialog is shown requesting permission from the user for basic info permission
The URL for the popup changes to http://rootofmysite.com/?installed=1&token=3e3920d309
The user is left wondering what is going on, and the onlogin callback is NOT fired.
So, the popup window is replaced with my original site, and in the querystring is the OAuth token? This looks to be the "Post-Authorise Callback" URL which used to be in the Facebook Application Settings - but has been removed. Anyway, i dont care about this URL - i request permissions/authorization using the client-side JavaScript API, as im a sure a lot of people do.
I understand the user is already authenticated, so they wouldn't need to login again, but what i dont understand is a) why the "onlogin" event handler is not called, and b) why on earth are they replacing THEIR dialog with my site and the OAuth token in the url?
At the moment, i am trying to do a "creative workaround" where i detect this URL and close the popup and call my "onlogin" handler manually (what Facebook SHOULD be doing).
Still, quite dodgy.
EDIT
It's another bug peoples. Please vote for it so they fix it.
It's a (unconfirmed) bug.
http://bugs.developers.facebook.net/show_bug.cgi?id=12260
Hopefully it gets more votes so it gets fixed - vote people!
In the meantime, i am (attempting) to employ the following 'creative workaround':
Add logic to my Default.aspx page to detect that URL they are redirecting to in the popup.
Redirect to my page, FacebookInboundAuthorization.aspx, preserving querystring.
On load of that page, register some JavaScript to close the popup and manually fire the "onlogin" event handler for my button.
EDIT
To clarify my above, i didnt mean "vote people" as in to vote for my answer here, i meant vote for the bug on Bugzilla (so that FB accept it as an issue and fix it).