How to create a Login with Facebook on a form?

Posted on 2011-03-18
Last Modified: 2013-11-13
I've looked at Facebook developer pages until I go blue in the face. I am looking for a simple way to add the "Login with Facebook" link to our forms so that people with Facebook accounts can quickly fill in forms to our site. I've seen this everywhere, but cannot find simple instructions or guidelines.

Hopefully not needed, but it looks like I must get a appid from Facebook. Any way to avoid? At present the relevant page in FB impressively comes up with a message mainly in HTML:-
"Your account must be verified before you can take this action. Please verify your account by adding your <a onclick="var newwindow =;http:\/\/\/confirmphone.php",'confirm_phone';, &#039;height=350, width=520, left=100, top=100, resizable=yes, scrollbars=no, toolbar=no, status=no&#039;);if (newwindow) &#123; newwindow.focus();&#125; else &#123; alert(&quot;A pop-up blocker may be disabling the the mobile verification window.&quot;);&#125;">Mobile phone</a> or <a href="" target="_blank">Credit/debit card</a>."!
Question by:pld51
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 25

Assisted Solution

lenamtl earned 75 total points
ID: 35172386

Author Comment

ID: 35194739
Sorry for the delay in answering. The tutorial looks good, but it looks like you have to create an application first. Is there no way to avoid this?

Expert Comment

by:Mike D
ID: 35276985
No, there is no way to avoid this. The App and with it the app ID are how facebook maintain the connection between your website and their database.
What's your problem? Just verify your account (you do have a mobile phone I presume), set up your app and be done...

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users


Author Comment

ID: 35281044
Thanks johndoeherty:
Yes, have mobile but in Costa Rica, so first attempt failed to get SMS. Not easy. And how/what to create as app also a mystery.

Expert Comment

by:Mike D
ID: 35281519
Did it work now with the SMS? If Yes your ready to go!
Install the developer app, Set up an app (you don't really have to fill all the fields out since you only need the app id and secret) and use them as described above.


Author Comment

ID: 35281814
Not tried again with SMS. I realize I am not still clear on process.

I have a personal facebook profile which is one of the administrators of a new company page just being created. The Facebook Connect we want to create is for the company, ie objective is for people to fill in forms on our company website using FB Connect.

So do I get my personal profile verified, and create an app for the personal account? Or should it be somehow linked to the FB page for the company?
LVL 30

Assisted Solution

MlandaT earned 75 total points
ID: 35282105

You will need to get you profile verified. This is done for security reasons.

Accepted Solution

Mike D earned 350 total points
ID: 35282128
Yes, you get your personal profile verified and create the app. The app is your 'property'. It could be a stand-alone app (so called 'canvas' app) which lives by itself under a URL like or a 'profile' app which lives on your (or any other) business page and shows up in the left navigation (what used to be 'tabs').
In your case it would be neither, you just need the app id and secret as a type of identification so facebook knows who is accessing their API.

Don't confuse this with the 'like' (or 'share' etc) button or the like or feed box - these either post a link to your website on the persons profile or display what's going on on your company page.


Author Closing Comment

ID: 36054860
Thanks for all the help, and extreme apologies for my long delay at the end. Help appreciated!

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question