Facebook Connect - Mobile - php

I am currently in the process of creating a mobile version of my web app.
The app is being developed with Facebook's PHP Client Library.
The issue:
I am using the following mobile url to allow users to log in using the mobile devices:
http://m.facebook.com/tos.php?api_key=APIKEY&v=1.0&next=http%3A%2F%2Ftweelay.net%2Fm.php&cancel=http%3A%2F%2Ftweelay.net%2Fm.php
APIKEY being my app's actual Facebook API key.
In the url I am telling Facebook to redirect the user back to http://tweelay.net/m.php when the user signs in or clicks cancel on the log in screen. I am pulling my hair trying to figure out why it keeps sending the user to http://m.tweelay.net/m.php which is currently an invalid end point.
I have gone through all of my app's settings on Facebook and I cant find any that reference http://m.tweelay.net and going through all of my source code I cant find any that reference the m. sub-domain either.
Any ideas? Is there a setting I'm missing? Maybe a Flag in the library?

I've seen Facebook do this when detecting the mobile browser type and also sometimes randomly through Firefox (it can also happen when trying to get to facebook.com). I've managed to reset it sometimes, but it's not a guaranteed fix.
If you want to be sure the user makes it to your correct site I suggest creating the subdomain and redirecting traffic to your usual site, it's what I did and now I don't worry about it reverting back.

Related

Facebook App rejecting call from domain set as Canvas URL

I have a situation where I need to be able to make calls to my Facebook App from 2 domains. Previously everything has come from www.domain1.co.uk but now I need to change my Website platform url to www.domain2.co.uk.
In accordance with this qu and answer (Facebook login with multiple domains.)
I have added a dummy canvas page (no page tab tho) which has been assigned to www.domain1.co.uk and changed my website platform url to be www.domain2.co.uk. I have then added www.domain2.co.uk to my App Domains.
So my App Domains are now www.domain1.co.uk and www.domain2.co.uk.
Currently the Facebook Login function still works for my website # www.domain1.co.uk but not # www.domain2.co.uk. I made the changes a good 5 hours ago.
I use Login with Facebook and Register with Facebook via this app. Client OAuth Login and Web OAuth Login are enabled for this app. There are no Valid OAuth redirect URIs stored.
Could anyone point me in the direction of what I need to fix here please?
Many thanks.
Kind Regards
Liz
Okay intensive investigation has revealed that it helps to make the changes to the correct app.
The changes kicked in immediately at that point.
Apologies for any wasted time.

Resetting a FaceBook App Domain and Web Platform URL - Possible Caching issue?

I have an app where currently the App Domain is set to www.site1.co.uk as is the Web Platform URL. I use Login with Facebook and Register with Facebook via this app. Client OAuth Login and Web OAuth Login are enabled for this app. There are no Valid OAuth redirect URIs stored.
I need to change this to www.site2.co.uk. If I change both the App Domain and Web Platform URL to www.site2.co.uk and then go to the website www.site2.co.uk and click on the login withFacebook button I still get the error stating that the url is not permitted by the application settings as it doesn't match the website URL. The Login as Facebook button still works on www.site1.co.uk at this point.
Are these values cached? If so how may I clear them please?
Also will changing these URLS mean that users who have previously registered or logged in via the www.site1.co.uk domain need to re-register etc from www.site2.co.uk or will they be able to continue to access the app via the new url unaffected?
This question/answer (Does changing the Site URL/Domain of a Facebook App affect your users?) suggests that pre-existing users will not be affected but it IS quite old.
Any help gratefully received.
Many Thanks
Liz

IOS HTML5 app Facebook Login failure when 'Add to Home' screen used

I have been working on a website that has a mobile version. Integrated into the site is a bit of code that allows users with FB to register without having to fill out a form. If the user meets any of the following conditions all is well
Uses ANY desktop browser
Users ANY mobile browser
The FB just works. However as soon as I do an 'Add to Homescreen' with IOS to make the app look and perform like a native app, when anyone uses the FB signup I get the
'Given URL is not permitted by the application configuration: One or more of the given URL's is not allowed by the Apps settings. It must match the Website URL or the Canvas URL, or the domain must be a subdomain of one of the App domains'
I am assuming that once you use the add to home screen, and the app gets its own instanced browser, the URL changes, likely some form of localhost derivation maybe?
I can't find any definitive answers to fixing this, and was wondering if anyone else had experienced this HTML5 IOS app problem?
Looks like the dev of the extension I was using will be working on a different authentication flow, so not giving this any more dev time

Android and Javascript: How to know in javascript that an application is installed in the Android device or not?

I have an android app on Google Play and also an website where.
For the moment, I am using javascript to detect if the device connected to the website is an android device. If is, I am displaying a popup dialog on the device inviting the user to download the app from the PlayStore. If the user clicks ok, he will be redirected to the PlayStore page of my app, I f he clicks no, he will continue using the browser.
Now, the problem is that when the user have installed the app and tryes to access the webpage again, he will be asked again to download the app, even if he allready installed it (which is not a good idea).
Do you know a solution on how to check if the user has allready the app installed on his mobile device?
It is also possible to do android detection with php, so if you have a method with php to detect if the app is installed, I can also use it.
Thank you very much.
I don't think this is possible for security reasons. I would not want some random website I visit to be able to access my phone Package Manager and find out what apps I have installed.
This would raise a lot of privacy and security concerns.
But I saw one answer that might have a different way of achieving your intent that might be useful to you:
https://stackoverflow.com/a/12901352/1369222
Even if the user doesn't install your application, your web site shouldn't ask more than one or two times to download your application from the PlayStore. The usual way of doing this is to use the browser's cookies in order to remember if it's a new visitor or not. It's not full proof because the cookies functionality could have been deactivated but at least, you won't have to worry about this problem for most of your visitors.

I can't display my app on facebook

I'm having a little problem with the whole Facebook app development.
I created an facebook application and gave it an IP for my server.
I set my .php script file on the server and set the secret key and appId.
When I click on the app on my Facebook account to reach it, I get an "Uploading (0%)" text on the bottom of the browser and eventually I get a message:
"This webpage is not available".
When I used the "Heroku" hosting service, I got an app.
I think the problem is the communication between Facebook and my server but I don't know what.
I tried almost everything.
Can somebody help me?
If you issue a request to your application from the linter tool?
http://developers.facebook.com/tools/debug
If you run your own application url through there and don't see any activity then Facebook just cant access your server and you need to do some work with your firewall.

Categories