Facebook SDK: Ads Install Help on Xamarin.iOS - facebook

has anyone used the FBSettings.PublishInstall(APP_ID) api method from the Facebook SDK in Xamarin.iOS with success ?
I've read and applied all the stuff described here:
https://developers.facebook.com/docs/tutorials/mobile-app-ads/
but I'm unable to see any install notification on my FB developer application page.
Some questions:
- Is this testable in debug mode via a REAL device? (no emulator)
- To test if all is ok, do I need to create a campaign?
- There's a way to check if the method call FBSettings.PublishInstall() throw some error? I'm currently wrapping it in a try/catch block but nothing is thrown.
thanks
Francesco

I've finally sorted out the whole thing. I'm auto answering my question just in case anyone in future needs some help.
How to test Facebook Ads Install step by step:
As reference guide read this https://developers.facebook.com/docs/tutorials/mobile-app-ads/
Create a FB app and obtain a FB AppID (namespace is not required)
Fill iOS and Android store references data
Inlude the FB Sdk binding in your project
Execute the FBSettings.PublishInstall(APP_ID) in the OnActivated (for iOS) or in the OnResume (for Android) methods
Test this with an AdHoc release on a REAL device (don't know if it works with a debug release)
Very Important: the official FB app must be installed on the test device. Install notifications are sent ONLY if the FB app is installed and running (logged with a valid account) !!!!!!!

Related

Ionic Facebook plugin work only on one phone

I'm building an Ionic app with Facebook Login support.
I'm setting all as required in the developer.facebook.com settings and on config.xml on ionic config.
The login works fine for only my phone.
On every other phone the method facebook.login(['email']) reject Promise and pass an empty error.
How is it possible, counting that every configuration is compiler-related and not phone-related? There isn't config that uses device information.
Is really strange because I'm expecting does or doesn't work everywhere.
On every phone I've tried, Facebook app is installed and logged. No Facebook Lite installed.
Find the problem.
Facebook dev app was is develop mode so only me can access.
Possible solutions are:
Make in prod mode the app
Add other users facebook account to tester list

inmobi ads integration in an iphone app

I am trying to integrat inMobi ads in my iphone application. inmobi requires the live iphone app url in the configuration. As my app is not published on itunes yet, I am using url of another app which is live. My plan was to change the url in inmobi configuration with the correct url once my app is released
When I try to load the inmobi ad, the response goes into didFailRequestWithError. the error message is -
*"Unable to load__Error Domain=Invalid request. This could be due to an invalid app-id, or the app-id might not be in the Active state."*
is this error message due to wrong url? If yes then how can I enable inmobi in version 1.0 of my app and also test it to make sure that it is configured correctly.
Thanks for your help.
You can certainly test out ads on an app that is not live on the iTunes store.
It would be helpful if you could post some code here. You should check two things though:
The property ID you are using is indeed correct.
You have enabled your Property in test mode. There is a guide available here

Facebook iOS SDK - Authorize via new Facebook Mobile App returning "authorize#error=unkown_error"

Using latest github version of FB iOS SDK in my iOS app which previously worked fine authenticating with the Facebook app installed. Now in iOS 5 and using the new facebook mobile iOS app the url returned to my application is fb://authorize#unkown_error.
Has anyone encountered this. I verified that iOS SSO is enabled in my app in the facebook dev portal. I also tried creating a new facebook app from scratch and using that in my iOS app and it garnered the same result.
Thanks in advance.
When you try to use Facebook SDK as it was on 4 nov 2011 and complete the tutorial you will run into trouble as mentioned above, because it does not yet implement ARC. If you want to use Storyboarding as well you run into the trouble that the appDelegate now has a slightly different scope. You should not, as the tutorial states, make the appDelegate you respond to Facebook delegate methods but you should doe this in the rootViewController.
I posted a code whit a fix on gitug: git#github.com:doozMen/Facebook-SDK-in-iOS5-and-using-storyboarding.git
in Xcode 4.2.1 when adding the src folder according to the tutorial , you need to include it fully without removing the project file , but on the add files popup you need to to deselect the add to target. then in your linkage build rule add the resulting static library of Facebook to the build target and not the source itself. in that way Facebook compile as is and can be used with or with out ARC/SB .

Facebook Authorize not working on free version of app

I have a free and paid version of my app on itunes but as the free version has in app purchase I cant use the same bundle id across the two apps and therefore the only way I can see of adding facebook to the free app is having a second facebook app registered?
I have done this but for some reason when calling [facebook authorize: permissions] my app boots up the facebook app but returns straight away to my app, not getting in to any of the handleOpenUrl functions or even asking the user for permissions. The code is identical line by line to the paid version of my app with the only difference being the appID that is used. Any ideas what would cause this? Facebook did work on both apps until the recent updates.
After further playing around with this code I have found it works if I tell it to not use the FB App and to instead use safari authorisation. Still failing to see why I can use the app on one app but not another :s
Log in to developers.facebook.com and check your iOS bundle ID for your free app carefully. Make sure the bundle ID you tell Facebook is exactly what your app thinks it is. If it's not identical, the new Facebook app will not allow your app to authenticate.
You can have multiple iOS apps use the same Facebook app. Check this link..
https://developers.facebook.com/docs/mobile/ios/build/#multipleapps
There are three steps:
Add the additional bundle id in your apps "iOS Bundle ID" file in your faceBook app settings.
Then in your iOS apps, use the 'urlSchemeSuffix' option in the 'initWithAppId' method.
Modify the URL Schemes property in the info.plist.
The link explains it in detail. No need to register a 2nd app with Facebook.
Hope this helps.

how to avoid twitter already authorized on the device using share kit in iphone sdk

I used sharekit for twitter integration in my app. That works fine on the simulator. But on the device , for the first time it allows me to login into the twitter . Now i deleted the app from the device and create new build and deploy that into device again. Now it shows already authorized for twitter , not able to login even i deploy the new build on the device
Any ideas..to avoid this.
Thanks in advance..
The data for Sharekit's Twitter implementation are stored in the user's keychain when you run on the device. Because of this, deleting the app will not delete the token for Twitter stored in the keychain by Sharekit. When you delete and reinstall the app, it's still reading from the keychain and picking up the old credentials. You need to implement the logout functionality. The implementation is pretty simple. You just call
[SHKTwitter logout];
Check out the ShareKit documentation for details and options.