When attempting to post using a Facebook generated test account from the app using the iOS 6 ,UIActivityViewController or SLComposeViewController I get the error popup message "Cannot Post To Facebook - The post cannot be sent because the connection to Facebook failed". I see this both on an iPhone and the simulator.
The iOS API works fine with a real Facebook account.
The test account works fine when using the Facebook iOS App or the web interface.
Facebook will not allow back to back posting of same content. But this case is not handled by SLComposeViewController. It will pass result as SLComposeViewControllerResultDone and through you an error message
Cannot Post To Facebook - The post cannot be sent because the connection to Facebook failed.
Related
My app was rejected by Apple because "Login via Facebook" opens the Safari app, because I am using UIWebView for Facebook login, which is working fine. I am getting the access token as well.
The problem is I also need user information like user ID, email ID, user name etc. because I need to save it on my server.
How do I get the logged-in user's info when I have the access token?
Have you read the FB iOS documentation?
https://developers.facebook.com/docs/reference/ios/current/
There is an API called FBRequest which can retrieve various information or the Graph API can be used to obtain stuff.
How to integrate FB login with an iOS app is fully documented with example projects.
As per title in my app i can successfully login with facebook or google account as per tutorial given in developer.facebook.com and developer.google.com but problem is that flows not return from browser to my app.
Did you configure your project's URL Schemes correctly in your info plist?
https://developers.facebook.com/docs/ios/getting-started#configure
The login calls a custom URL that your app has to handle after the authentication is done
I have a mobile web application that integrates with the Facebook Graph API.
Basically, it uses the JS SDK to obtain details about the viewing user that it can then use to render user specific content.
I use the FB.login function to have the user login to my Facebook app. This should work as follows:
JS on pages detects that user has not logged in to Facebook app
User is given button to click to fire FB.login
User is redirected to Facebook page to authorise the app and login
User is redirected back to my mobile web application
JS on pages detects that user is logged in to Facebook app, polls user data from Graph and renders it.
This all works fine on Android, but the redirect step does not work on Mobile Safari
The user gets an error referring to an EntityRef, which looks like the Content-type being sent to the browser is XML but where the content includes an illegal character:
Error on line 1 at column 49: EntityRef: expecting ';'
This is the actual link that is generating the error:
https://m.facebook.com/dialog/oauth?display=touch&domain=cgfoodscomp.herokuapp.com&scope=email&e2e=%7B%7D&app_id=135937919902029&locale=en_US&sdk=joey&client_id=135937919902029&redirect_uri=https%3A%2F%2Fs-static.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D24%23cb%3Df3cf8ca2ac%26origin%3Dhttps%253A%252F%252Fcgfoodscomp.herokuapp.com%252Ff2d1c54b04%26domain%3Dcgfoodscomp.herokuapp.com%26relation%3Dopener%26frame%3Df35f8ac348&origin=2&response_type=token%2Csigned_request
When you open this in another browser, you get a response with Javascript (I won't post it here as it contains script tags), which contains references to the iPhone:
iPhone.*Version/(5|6)
I'm actually using a Version 4 IOS.
Does anyone know if this stuff is supposed to work in Version 4?
This is a Facebook Bug, which is due for resolution:
https://developers.facebook.com/bugs/339889299473431
I have a big problem with Facebook Login. I update the code to the new SDK on my developer server and I create a new FB app. Everything work fine, and when I try to login with facebook I have the popup that call something like
"https://www.facebook.com/login.php?api_key=.... "
Now I copy the code on my live server and I uppdate my old Facebook app, but with the same code and the same setting of the app I receive an error.
The popup call something like:
"https://www.facebook.com/dialog/oauth?api_key=...." and I receive an error in the popup.
The problem is in the Facebook App, but the settings are the same!
Can anyone tell me why I have this problem? Same settings but different response from the app?
i integrated facebook logn button in my ipad app and tried running it. when i clicked on the button it was showing login page and after i login with my fb username and password ,it showing the address(http://facebook/connect/uiserver.php) invalid in simulator. i have created app id in facebook developers.
Make sure you have updated the DemoApp-Info.plist file with your app id.