Trigger.io forge.facebook is undefined - trigger.io

I have set up the Facebook module. Here is the code from my config file
"modules": {
"facebook": {
"version": "2.0.1",
"config": {
"appid": "XXXXXXX"
}
}
}
However, when I run my app (web) I forge.facebook is undefined.
Any idea why is that happening?
Thanks!
p.s
I get the same problem when trying to use UrbanAirship

Answering my own question (silly solution, but I feel that other people might make the same mistake)
Turns out both Facebook and UrbanAirship pluging with only on Android and IOS, not mobile. Trugger.io document ion makes it a bit tricky to notice, but the supported platforms are listed under every api call.
To get Facebook working on mobile you need to form a seperate branch with a regular Facebook Javascript api implementation.

Related

Firebase dynamic links that open in multiple apps

I have previously used deeplinks to open in multiple apps depending on what the user has installed. I have now upgraded to dynamic links and can't figure out how to get this to work.
Currently it only opens in com.myapp
I have multiple apps (4 apps for both iOS and Android) that I want to be able to open a dynamic link in.
If one of the apps is installed then use that otherwise go to the appropriate store for the first app in the list.
It looks like you can only put one apn or ibi in the dynamic link.
Is this possible or will I have to revert back to using deeplinks for this purpose?
Long Dynamic link:
https://go.myapp.com/?link=https://member.myapp.com/register&apn=com.myapp&isi=appid&ibi=com.myapp
My AASA currently looks like this:
{
"applinks": {
"webcredentials": {
"apps": [ "appid.com.myapp" ]
},
"details": [
{
"appID": "appid4.com.myapp4",
"paths": ["appname4/*"]
},
{
"appID": "appid3.com.myapp3",
"paths": ["appname3/*"]
},
{
"appID": "appid2.com.myapp2",
"paths": ["appname2/*"]
},
{
"appID": "appid.com.myapp",
"paths": ["*"]
}
]
}
}
EDIT:
Same issue in github:
https://github.com/firebase/firebase-ios-sdk/issues/9542
EDIT 2:
From Firebase support:
To give an overview, FDL can only support one app (iOS / Android /
Web) per Firebase project. This is because the paths in the
apple-app-site-association (AASA) file are /*, so the Dynamic Link
will try to open the first app it sees in that list, and we don't have
a way to guarantee how they are presented in the association. With
that, the multiple apps associated with your Firebase project will
cause reliability on navigating your Firebase Dynamic Links.
For now, aside from using deeplinks, you can use a different project
for the other apps so that you won’t experience opening behavior
issues. You can also try the workarounds mentioned in this related
Stack Overflow post.
Lastly, we are aware that many developers, such as yourself, would
like for FDL to support multiple apps. Please note that our team is
exploring potential solutions to make this happen, and we have an
internal feature request for this. As an action, I’ve linked your
support ticket to let our engineering team know the increasing
interest to have this type of feature implemented, though, I can't
give any details or timeline as to when it will be available. For now,
I suggest keeping an eye out on our official blog and release notes
from time to time for any updates.
Same issue with some suggested workarounds which I have yet to try.
Firebase Dynamic-Links is not working for different target in same project in iOS

App Clip Domain Status Error, Invocation Not Working

I'm working on building my first App Clip and am hoping to get thoughts on an issue I'm facing. The App Clip is meant to allow me to sell items from my own little personal shop without people having to download my full app first.
When I try to upload my App Clip to the App Store, I'm getting a Domain URL Status error of "Unexpected Error"
My App has what I believe to be an appropriate Apple App Site Association file at the domain I've provided (I've checked it a number of times and the invocation works correctly in my developer local experience) so I don't see where that problem is coming from. This is what the JSON looks like on the website and also code below (with the identifying information changed to their generalized labels):
{
"appclips": {
"apps": [
"TeamIDNumber.com.AppName.AppBundleID.Clip"
]
},
"applinks": {
"apps": [],
"details": [
{
"appID": "TeamIDNumber.com.AppName.AppBundleID.MarqetAppTest",
"paths": [
"*"
]
}
]
}
}
In addition, when I try to create an Advanced App Clip Experience so that I can use QR code and NFC invocations, I get an error that "This URL is not contained in your app's associated domains".
However, when I go into the build metadata, it clearly shows my website as an associated domain so I don't know whats causing that error.
The consequence of all this is that when I use an NFC tag (or scan the QR code using the iPhone QR reader) with my phone, I get taken to my website on Safari rather than the App Clip invocation coming up.
I submitted a ticket to Apple nearly 3 weeks ago and am being told they have no updates so checking if anyone here has thoughts. Any input appreciated, thank you!
This has been resolved with the help of Apple! A bit embarrassing to say, but the error was that in the associated domains I had included an unnecessary space after the colon. So the associated domain was written as "appclips: marqetapp.com" when it should have been "appclips:marqetapp.com". Apple informed me that they are working to update their error messaging to make these kinds of issues clearer in the future.

iPhone keeps sending apple-site-association requests

Not sure if here is the right place to ask this, sorry if not.
Today I've set up my iPhone to use Fiddler as proxy and then saw that it makes requests to /.well-known/apple-site-association for applications.
I know it's for a purpose but the weird thing is it keeps sending same request for lots of apps (and for every country domain for apps like Tripadvisor) and like in an infinite loop. Again and again for same app and domains and doesn’t stop doing that. I saw that once before too. When I restart the phone it stops.
What can be the reason for this?
Thank you very much.
iPhone sends these requests to download files from each domain which tells the iphone which apps support which universal links.
If you look at the description from the following URL you can see that this company has two apps which supports the following URL's which can be directly opened inside the app instead of being re-directing to web pages.
So if you encounter anywhere on your phone the link "www.ixigo.com/flights" (lets say in a message in whatsapp)it iOS will straight away open the app as the app supports these url.
Similarly if an APP supports multiple domains, iOS will make multiple hits and download all the urls which the app supports.
https://www.ixigo.com/apple-app-site-association
{
"applinks": {
"apps": [],
"details": [
{
"appID": "6WCD67RXUP.com.ixigo.travel",
"paths": [
"/flights",
"/hotels",
"/holiday-tour-packages",
"/holiday-tour-packages",
"/restaurants",
"/ixigoer",
"/near-me",
"/send-enquiry",
"/ixigomoney"
]
},
{
"appID": "6WCD67RXUP.com.ixigo.trains",
"paths" : [
"/trains",
"/search/result/train/*"
]
}
]
}
}
This is related to Web Browser–to–Native App Handoff.
User activities can be shared among apps that are signed with the same developer team identifier and supporting a given activity type. If an app is document-based, it can opt to support Handoff automatically
Read More Here

xcode apigee logInUserWithFacebook extra parameter?

I'm using Apigee for my iphone/ipad app.
Like many apps today, mine requires a login via Facebook and Apigee has a function specifically for this in the iOs framework, here's how it's called:
[ApigeeDataClient logInUserWithFacebook:[FBSession activeSession].accessTokenData.accessToken];
As far as my code goes, everything works well up until the above line. I'm receiving the following error.
Response: {"error":"invalid_request","error_description":"missing access token"}
However check out how the function is making the call (from the logs):
Synch outgoing call: 'https://api.usergrid.com/sgfishing/deepseafishing/auth/facebook?ql=fb_access_token=CAADrhKxrQp4BANfZCMuZBdOwUL9nc0H4VzZC1EXVLjABRbcrucTlUgwlKczFinl51GIWyBM5nlZBX1RF84azFAEOfChqN7vgSmvqgwybV8iPU2xjncZB9T5YTdY0pesJkHsSlvOafMhQ6MfIa6qdZCbTYBZCFB2oIPgEnro4runJKcqCy68wZCFQwyIzACVThAC3IEjZADs36hToQxhYZBzAWVhbKlcqJQsroZD'
I would like to bring your attention to this ...facebook?<b>ql=</b>fb_access_token=CAADrh....
I'm not sure why ql= is there, I've checked the definition of logInUserWithFacebook and ql= is nowhere to be found.
Any help would be greatly appreciated.
This is a bug in our iOS SDK. It has been fixed in version 2.0.9 of our SDK (released yesterday).
?ql= is typically used for query language statements see if there is any such code around in your program
This just a tip...may help

iOS: using ShareKit 2.0 to access Facebook. Need to set restriction for alcohol for the app

I am developing an iOS app for an alcohol related company. The app is a sort of treasure hunt, kind of. They want the app user to be able to upload to Facebook when they find one of the virtual objects that they have scattered around.
I am using ShareKit 2.0 (the offshoot from github) for Facebook access.
I need to mark the app as restricted by type alcohol. Can this be done once on the Facebook developer site for the app or does the app have to do it when it logs in each time?
I found
http://developers.facebook.com/docs/reference/rest/admin.setRestrictionInfo/
In the test console I set the APP to my app in the popup, and put in
{"type":"alcohol"}.
But I get back an error, which seems strange to me since the request shows an access_token
{
"error_code": 15,
"error_msg": "This method must be called with an app access_token.",
"request_args": [
{
"key": "restriction_str",
"value": " {"type":"alcohol"}."
},
{
"key": "method",
"value": "admin.setRestrictionInfo"
},
{
"key": "access_token",
"value": "AAAC9ngVeKI4BAMkOq14ogA3fKMS6 -- blah blah -- ZCqK5LR"
},
{
"key": "format",
"value": "json"
}
]
}
I am not sure how this needs to be done.
ETA: so I found this: http://developers.facebook.com/docs/reference/api/application/#restrictions
and this:
http://developers.facebook.com/blog/post/574
And I tried executing that using my appID and the access_token I got using a browser and I got back
{
"error": {
"message": "(#15) This method is not supported for native apps",
"type": "OAuthException"
}
}
The app is a native app (iOS and there will also be an Android version). So I am still not sure on how to set the restriction flag of type=alcohol for this app.
ETA v2: So I temporarily turned of the native app designation and did the following
https://graph.facebook.com/MYAPPID?restrictions={"type":"alcohol"}&method=post&access_token=MYAPPID|MYACCESSTOKEN
When I first did it earlier today, I got back an error about a format problem. But I just redid it (same query still in the browser), and it seemed to work. Querying for restrictions shows alcohol.
So I guess this is set and done and working. However, if I go reset the app to be a "native" app, it wipes out the setting. But if I leave it a web app on the Developer Facebook settings, it seems to stay, and my iOS app still seems to be able to post.
Is this the way it is supposed to work or is there a better way?

Resources