-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access token failed issue #1
Comments
Hello battika,
you will have something like this : Melody Token
Array
(
[id] =>
[name] => facebook
[token_key] => AAAEVR8LdU70BADiYABjHDZB9KBZASayQ8Irku6PXWshfROWKv918kdMOZCX6hZA9bW63HQq6otIrFTex6lVDzNjMEINctel6r8BC7y3UWfSUkVjnwXFq
[token_secret] =>
[user_id] =>
[expire] => 1322650800
[params] => Array
(
[expires] => 4841
)
[identifier] => 102644XXXX
[status] => access
[o_auth_version] => 2
[created_at] =>
[updated_at] =>
) I will update the project asap as i am willing to add google connect and handle email check and account activation for twitter connect. |
Hello ElWardi, Thank you for your prompt and helpful answer. Thanks for adding more examples to the project I'm very interested in seeing how Google Connect will be done. I very much look forward to it. I've managed to "solve" the issue but I'm even more confused now. What I actually did was installed Virtualbox on my Windows 7 and installed CentOS 6 on it. Deployed XAMPP for Linux from here http://www.apachefriends.org/en/xampp-linux.html I would like to find the root cause of the problem since I'm using Windows as dev environment and I have no intention to change it. Or at least this is something I have never considered until this point. I will try your suggestions and see if they work out well. Thank you again for your time and effort. |
I am keeping the issue open in case you or any other found out a fix for it, |
Hello ElWardi, I managed to find a solution to the problem. Windows version of the curl PHP library does not contain the Certificate Authority bundle (cacerts file) so curl will not be able to verify Facebook site's cerficate. Remember, we are using https:// to get data from Facebook. To avoid this issue we need to make sure that curl is provided with a valid cacerts file through the curl_setopt(, CURLOPT_CAINFO, ) function call. You can find some more information here: Since the problem is caused by the OAuthBase library I suggest that this issue should be closed. Thanks very much for this great demo and I look forward to further updates. |
Hello ElWardi,
Thanks for putting sfMelodyDemo example symfony project together. I'm wondering if you could give me some sort of direction as I cannot get the demo work.
Downloaded the code and followed your instructions to set it up. I'm using WAMP on Windows 7 and created a virtual host of sfmelodydemo.dev to match your setup and changed my Windows hosts file sfmelodydemo.dev pointing to 127.0.0.1. Created a developer app on Facebook, set the Site URL field to sfmelodydemo.dev and finally ran
symfony doctrine:build --all --and-load
command to create the database backend. I think it should be all set.When I open http://sfmelodydemo.dev/frontend_dev.php in my web browser it gives me two options to log on with, Facebook and Twitter. I choose Facebook which will redirect to my Facebook app page where I successfully log on with my Facebook account. When I get redirected to sfmelodydemo.dev/frontend_dev.php it throws an internal server error 500 message, Doctrine_Table_Exception, saying that
You must specify the value to findOneBy
. It occurs as inside theexecuteFacebookSignup
action where we attempt to find out whether the email address is already present:Since user->getEmailAddress() returns null, findOneByEmailAddress function will fail.
The reason why it fails is we are unable to get a valid access token from Facebook. Here are some excerpts from the log file...
Initial authorize request seems fine. URL looks Okay.
Then I get this issue of access token failed and a zero-sized array is returned:
It all goes wrong after this due to the missing token.
Symptoms are very similar to the ones reported by JeJeJeRe in this issue: chok/sfMelodyPlugin#9
He solved it by moving his project to a real online domain. I don't think it should necessarily be the root cause here. Looking at the domain name configured in your project (sfmelodydemo.dev) I suppose you are also using a virtual environment. Can you please confirm that? Any other help with setting up the demo would be appreciated.
Thanks in advance.
The text was updated successfully, but these errors were encountered: