ios facebook sdk v3.11 share dialog post button disabled - ios

I was following the tutorial for facebook sdk for ios, specially using open graph to attach an image and tag friends (which social framework can't do directly).
So I was following this tutorial and this sample app, FBOGSampleSD. https://developers.facebook.com/docs/ios/open-graph#sharedialog
However my post button in the share dialog is always disabled. (grey out)
Has anyone encountered this before?
I am working with Xcode 5 and testing on ios7 device.
Regards,
Jin

I think I figure this out.
Your share button might be disabled because you didn't finish the Facebook app configuration, or it doesn't match what you are sharing through xcode/ios app.
- on Facebook Developer
In the settings of your app, you need to have iOS AND website added as platforms.
in the website platform you need to declare the website url or mobile site url: this is going to be used when someone click on your post from a computer. It needs to be a real site you can access, possibly the website of your app or a webpage about your app included on a website. For this example I'll be using
http://www.yourappwebsite.com
Once you do this, in the "Add Domains" field (in the section where you set namespace Display name and such), you need to put the SAME domain you declare as a website.
This will be the only domain(s) allowed to host links and image of your OGStory.
In this example is
yourappwebsite.com
- Back to Xcode
You should have some code that define the object you are posting an the action, something like:
[FBGraphObject openGraphObjectForPostWithType:#"yourapp:yourobject"
title:#"Roasted pumpkin seeds"
image:#"http://www.yourappwebsite.com/yourpic.png"
url:#"http://www.yourappwebsite.com"
description:#"Crunchy pumpkin seeds roasted in butter and lightly salted."];
As you can notice, the domain used for both the link AND the image is the one previously specified.
Now your share button should appear enabled.
I hope it helps,
ciao.

I was struggling with the disabled POST button myself and it turned out that my App's plist information was not set correctly for Facebook integration. Specially the FacebookDisplayName must match the name you entered in your Fcb App settings.
This SO answer pointed me to right direction, hope it helps!

[FBGraphObject openGraphObjectForPostWithType:#"namespace:yourobject"
title:#"Roasted pumpkin seeds"
image:#"http://www.yourappwebsite.com/yourpic.png"
url:#"http://www.yourappwebsite.com"
description:#"Crunchy pumpkin seeds roasted in butter and lightly salted."]
namespace is the one you have to set it in your setting->basic->namespace

Related

Set your app to detect and open when a specific link is clicked - Xcode, Swft 4

I'm currently working on an iOS app, Swift 4, that automatically launches on click of a link to block users from accidentally navigating to that link.
How would I set this up?
For example, YouTube opens up youtube.com links.
Sorry if this is a vague question, if more info is required feel free to ask ^^
If you create a custom URL protocol like myapp://somepath (where myapp is the protocol) then you just register that custom protocol, and when the user clicks such a link it’ll automatically open your app. You can’t intercept a general purpose URL protocol like HTTP or YouTube.
(At least not without OS support. That's how YouTube and the app store are able to open HTTP links.)
I haven't done anything like this so far but it seems like you should take a look at Apple URL Scheme and Universal Links:
https://developer.apple.com/library/content/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html
https://coderwall.com/p/mtjaeq/ios-custom-url-scheme
https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html
https://www.raywenderlich.com/128948/universal-links-make-connection?utm_source=raywenderlich.com%20Weekly&utm_campaign=95f29cf4fc-raywenderlich_com_Weekly5_31_2016&utm_medium=email&utm_term=0_83b6edc87f-95f29cf4fc-415182745

Firebase Deeplink not redirecting to app if select goo.gl

I'm integrating firebase in application. I created universal link that worked for Android & iOS both.
This worked great. BUT I got scenario where I clicked on goo.gl (PFA) link which was displaying on launched app right-top side. And from then no matter what I do, Deeplink will never launch my application.
I checked to clear history of device-browser but it's same. Any suggestion how to get rid of this issue/feature ??
You're absolutely right: the forward button is horrible UI/UX. It's one of the big flaws with Universal Links identified in this blog post. There is no way to disable the forward button, and once it's triggered, you're screwed.
The easiest way to re-enable Universal Linking behavior after it is turned off is to long-press on the link. Your best bet at getting a clean shot is to paste the Universal Link URL into the stock Notes app and try long-pressing it from there.
Long hold on the url and there will be option to open in app.
Usually when you click the "forward" link to open the universal link in Safari, you can re-open the app by dragging the page down. A bar will appear with your app name and an "OPEN" button. This works as long as you're still in the same URL.
Unfortunately, for Firebase Dynamic Links specifically, the link will redirect you to another domain (for example, from https://z99zz.app.goo.gl/zzzz to https://z99zz-c.app.goo.gl/zzzz) and this breaks this feature. The solution is to either add ?d=1 to the original link (https://z99zz.app.goo.gl/zzzz?d=1, opens a link debug page), or just remove everything after the domain (https://z99zz.app.goo.gl/, opens an error page). Now when it opens in Safari, you can drag down and see the bar.
In addition to imgx64 post. I had a similar problem: Firebase redirected to z99zz-c.app.goo.gl/zzzz and in this case system was not redirected to my app. I added "applinks:mzn3g-c.app.goo.gl" as Associated domain in my target capabilities and this does the trick! Even if you redirected to domain with "-c" suffix iOS can recognize it and will redirect to your app and show suggestion in Safari

Facebook/Mobile deep-linking + app links

I'm confused. I think I've fundamentally misunderstood how to use Open Graph stories + deep-linking across my iOS/Web app. I'm hoping someone can help me clarify things. Here's what I have:
A web app set up that takes http://mywebapp.com/?video_id=XXXXXXXX
Properly configured meta tags for app-links
An iOS app with similar functionality that communicates with an API
Facebook sharing on the iOS app.
Here's what I expect:
See a link (ON MOBILE) in either the Facebook app or Safari, when I tap the link get the 'Install App' or 'Open in App' UX
I experimented with simply linking to 'http://mywebapp.com/?video_id=XXXXXXXX'. It doesn't work UNLESS I go to the object debugger (https://developers.facebook.com/tools/debug/og/object/) and 'Fetch New Scrape Information' for that video_id (i.e. it doesn't work dynamically, the page has to be scraped.) I also tried using Open Graph sharing with a contentURL and a combination of custom objects/actions/content/stories and at no stage did the Facebook app offer to open up the iOS app (again, unless I scraped the page in advance).
Have I misunderstood what is possible? I take it that if I scrape + link to http://www.mywebapp.com it'll work fine, but I want to have custom stories like:
'User X played video 'Y' using MyWebApp', but that kind of dynamic sharing WITH a concept of deep linking/app link/whatever seems impossible. Does anyone have any experience with this?

Open iOS App by http:// link

I found a lot of tutorials about opening an app by a custom url scheme like:
myappname://
Thats nice but it would be great to open an app by registering the real app domain over the http link like
http://www.myappdomain.com/blablabla
So - for example - if a visitor comes to a webpage (on her/his mobile) it is normally opened in the browser, excepts the installed app is listening to the opened URL and opens itself instead of the browser.
How is this done (i've seen this at another app). Any help would be great. Thanks in advance!
It is a new feature in iOS9. It is explained in the WWDC15 talk Seamless linking to your App.
You could also add a small piece of javascript to each page that opens your custom URL-scheme.

Link to open up iOS app from facebook and twitter page and other ios app?

Hi I have a requirement in my app. From my ios Application(myapp),i share a link to facebook. Then I opened up my facebook account in browser or Facebook application and clicked the link, link should open in myapp if myapp is installed in the device otherwise link should open in browser. How can I achieve this ? Please suggest me step by step. Thanks in advance for your consideration and help.
I am not sure if this is possible. I have looked at various questions including
Is it possible to register a http+domain-based URL Scheme for iPhone apps, like YouTube and Maps?
as I am sure you might have already done but these questions target their own app, mainly web app, but you want that behavior to occur from an app that is not yours like twitter or facebook. But what you can do is show them two links on facebook/twitter, if they have installed press link 1 and if they want to install, press link 2 and you can pass parameters in link 1 as you might already know.
I will also keep checking answer of this question if some one comes and gives a better solution.
There is an option called custom URL scheme in iOS. It will help you to create a URL scheme which identifies your application. You can post link with this URL scheme and when you tap on this link on your iOS device it will open up your mobile app. Please see the link below to know how to setup this.
Custom URL Scheme in iOS
This is called 'deep URL linking'. Facebook have built a service called 'App Links', which seems pretty cool.
https://developers.facebook.com/docs/ios/app-links

Resources