2 years ago I set up a website with facebook login and everything worked OK. Yesterday, I started working on a new project and I encountered the following problems. I use the latest version of SDK, and the server uses PHP 5.3.16 and is hosted on iPage.
- The login doesn't work. After I grant access to the app, getUser() always returns 0.
- When I login using Javascript SDK (which works), api(/me) returns nothing, but api(/user_id) works.
- Logout link doesn't work and redirects me t facebook homepage without logging out of my app.
I used the example file on PHP SDK, so I'm sure nothing's wrong with the code. Therefore, there must be something wrong with my server, or the SDK itself. I read tens of threads on StackOverflow and other websites, but couldn't find any fix. Since there are thousands of websites running FB PHP SDK without a problem, I am confused what I am doing wrong. I'd appreciate any help.