Facebook Single Sign-on OAuth | PHP
Saturday, May 14, 2011 |
Edit Post
Further to my Single Sign-on with Facebook LinkedIn GMail post, below is a single page example of how to authenticate, authorize and obtain user data such as an email address with Facebook's OAuth API written in PHP.
email) { // Code to handle successful authentication. echo(" $user->name: - $user->email - authorized -signing in now..."); // Take user to main page. echo "<script> setTimeout(function(){window.location='/'}, 3000);</script>"; } else { // Code to handle failure or refusal. echo "Something went wrong while trying to authorize your account with Facebook."; } ?>
Labels:
Tech
Dynamic Page QR Code
Popular Posts
-
Product Manager Cover Letter: This real cover letter worked successfully at getting an interview as a product manager. Use it as a templat...
-
Creating randomized valid file paths is a common requirement for many applications such as the case of short url redirects. The Goo.gl url s...
-
If you're interested in placing QR tags dynamically on your site, here's how I did it in less than 5 minutes thanks to Google's ...
-
Cover Letter Examples that I have used successfully to get a job interview: Further to my last post on this topic, there's no substi...
-
Is there a scientific reason that can explain Why People are So stupid? It's not surprising that so many people take advantage of being...
-
Sample for Cover Letters Writing an effective cover letter is essential to get yourself noticed. Use your cover letter as a sample of your...
-
Decoded HTML Encoded HTML Entities /** * Encode HTML tags as HTML Entities * using jQuery * * Code takes raw...
-
In my opinion, Git is a programmers program. It is fast, feature-rich yet intuitive, kind of like Google...there's a new treasure waitin...
-
Blogger RSS URL s can be customized to syndicate content in a user friendly way. This is especially important if you operate a multi-issue b...
-
The example below uses Google's OpenID API to request and validate the user's GMail address. The visitor is first directed to Google...
0 comments:
Post a Comment