Does the URL needs to be HTTPS for a messenger webview? - webview

I tried putting a HTTP URL in a Messenger Webview and the bot is crashing.

Yes, per Facebook Messenger's documentation, Webviews have to be HTTPS and they have to be whitelist in the Page Settings. For more details, take a look at Facebook Messenger's documentation on Whitelisting URLs.

Related

Facebook deeplinks tumblr app for my blog links on mobile

Very weird and annoying situation!
When clicking on the links of tumblr blog with custom domain in facebook app, instead of opening the url facebook offers tumblr app.
I believe facebook requests my url, understands it is tumblr and deeplinks its app instead of going to my blog url. Is it a server side problem from Tumblr or facebook issue?
Is there a way to cancel the deeplinking for the blog?
Steps to reproduce: Share the link on facebook. click on it using ios facebook app. Instead of opening the link, it opens the store link for tumblr app or opens tumblr app if it is already installed.
Exceptions: behavior is normal when the link is shared using a shortener service.

iOS app URL scheme for Facebook Messenger

I want to share my app URL scheme via FB Messenger, my URL scheme is myapp.
The problem is, when I send the message: myapp://?param1=1234, FB Messenger shows the message as plain text and not as a link.
My question is, what should I do to FB Messenger recognize my URL Scheme?
Facebook Messenger doesn't see custom URL schemes as hyperlinks, which is why they're being shown as plain text. Even if they were, those links would break for anyone who doesn't have the app installed so it would lead to a somewhat unpleasant user experience.
What you probably want to do instead is wrap your custom URL scheme links inside a standard HTTP link by using a redirect. If you add some fallback logic, you can even send visitors without the app installed to the app store to get it.
Branch.io (full disclosure: I'm on the team) can handle all of this for you and also does what is known as 'deferred deep linking', which means you can still route users without the app to the correct page after they have downloaded it.

Twitter Oauth through Twitter application iOS

I'm using STTwitter for twitter Oauth in iOS. Following is the URL used to redirect to the browser...
https://api.twitter.com/oauth/authorize?oauth_callback_confirmed=true&oauth_token_secret=XXXXXXXXXXXXXXXHas0lAxA3&force_login=1&oauth_token=YYYYYYYYYYYYYY
Is it possible to redirect to the iOS Twitter application instead of redirecting to browser for performing Oauth? If so what should be the URL for redirecting?
Thanks in advance.
Use a callback URL with a custom URL scheme for your app.
See also this answer.

How could Twitter know the source of TWRequest?

I'm just curious. TWRequests use generic ACAccounts which are shared by all apps on iOS. Apps don't specify their own consumer_keys. So how could Twitter know which app a specific TWRequest come from?
Twitter can't tell which app a specific TWRequest comes from.
Accounts.framework embeds consumer_key and consumer_secret.
For Twitter, all requests just seem to be coming from iOS Twitter integration.
Query params adc=phone and application_id=your_iosapp_sig (i think) are added to each request url during the OAuth process. Twitter should be able to identify your app by the application_id
Once you build your TWRequest, you can see the url request by
NSLog(#"%#", request.signedURLRequest.URL.absoluteString);
This should reveal the above two params.

Facebook login from internal IOS webpage

I load a webpage from native app's resource to UIWebview, and I want to login to facebook
from that page. According to FB's document, I need redirect_uri which is not available for an internal page.
Is there anyway to login Facebook from an internal webpage?
lvreiny
You can use FBConnect SDK via in-app auth. Check this out http://blog.grio.com/2012/02/in-app-facebook-authentication-on-ios.html

Resources