Track APP Installs from Facebook - android

I'm following documentation as states:
https://developers.facebook.com/docs/ads-for-apps/mobile-app-ads/#advanced
Specifically: Measure App Installs
However, I did the following code:
com.facebook.AppEventsLogger.activateApp( this, APPLICATION_ID_FACEBOOK );
However, in dashboard, it doesn't detect the install:
Any tips?
LogCat outputs the following:
FacebookException: No attribution id returned from the Facebook application

Ok. Solved.
Basically for whoever faces this:
FACEBOOK APP must be installed in device.
USER must be logged in.
Thats it.
=)

Another great but hidden hint is to enable verbose logging via
FacebookSdk.addLoggingBehavior(APP_EVENTS)
The output is actually very helpful and even contains error analysis and descriptions.

Related

Deeplinking Squareup pos app is not working

The documentation link: https://developer.squareup.com/docs/pos-api/build-mobile-web#step-5-test-your-code suggest straight forward code like this:
<a href="intent:#Intent;
action=com.squareup.pos.action.CHARGE;
package=com.squareup;
S.browser_fallback_url=https://my.website.com/index.html;
S.com.squareup.pos.WEB_CALLBACK_URI=https://my.website.com/index.html;
S.com.squareup.pos.CLIENT_ID=sq0ids-yourClientId;
S.com.squareup.pos.API_VERSION=v2.0;
i.com.squareup.pos.TOTAL_AMOUNT=100;
S.com.squareup.pos.CURRENCY_CODE=USD;
S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD,com.squareup.pos.TENDER_CASH;
end">Start Transaction</a>
I tested it and it does not open any link, my devide already have app installed.
When I try this code:
Take a QR code 2
It open play store app with squareup pos app information, I need to directly open the app and not play store screen of the app, is there any way?
*UPDATE:
I got transactions to work after adding S.com.squareup.pos.LOCATION_ID={{ my_location_id }}. The location ID can be found in Square Developer Portal > Locations. Also if the POS app is passcode protected, you have to open and login with passcode before sending transaction.
*END UPDATE
I've been working through this same issue. I still haven't gotten a transaction to work, but have at least gotten the app to open.
Make sure the CLIENT ID is your production application ID. NOT sandbox.
The WEB_CALLBACK_URI needs to match the Web Callback URL defined in your Square Developer Portal > Point Of Sale API.
I hope this helps. If you do figure this out and get transactions to work, please post your solution for me and others who are sure to run into this issue since the documentation is lacking.

WeChat SendAuth request for access token code only works once

I am following the WeChat Login documentation for Android and it works but only once and I can't repeat the process.
I use this code to get the access token code:
IWXAPI api = WXAPIFactory.createWXAPI(this, APP_ID, false);
SendAuth.Req request = new SendAuth.Req();
request.scope = "snsapi_userinfo";
request.state = "wechat_sdk_demo_test";
api.sendReq(request);
I have created the WXEntryActivty and I received the response from the WeChat app and I can finish the login process.
But if I reinstall my app and try to login with WeChat again I always get ERR_BAN (-6) error code. To make it work again I have to reinstall the WeChat app.
I could't find anything about when can I get ERR_BAN error code in the documentation. Can anyone help me with this problem?
I had many problems using Wechat API and testing directly on wechat app on my phone due to CACHE.
It's very difficult to flush wechat cache, i would say almost impossible, that's why you have to re install wechat to start your tests again.
I highly suggest you to use the desktop testing app for wechat, download it here, links are in the end of the page:
https://mp.weixin.qq.com/wiki?action=doc&id=mp1455784140
Then you will be able to debug every step of your development AND flush cache. Additionally you can link the software to your phone and debug what happens inside wechat web browser.
I managed to solve the problem. I copied the MD5 signature directly from the keytool's output which is contains colons :. I removed the colons from the signature and now it works correctly.
I think this is a bug in the WeChat app because the signature works with colons when the app displays the authorization page but not after that.

Android Facebookdialog disappearing instantly

I am building an android app which needs to share some content (image + text) to Facebook, using facebookDialog. The dialog works perfectly when using a Facebook developer account, but when using a regular account, the dialog appears and then disappears instantly. I have tried passing FORCE_DIALOG_AUTH, as i have seen in some similar posts, but in the best case it just keeps the dialog opened a couple more seconds. Code is pretty straight-forward:
FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(getActivity())
.setLink("https://developers.facebook.com /android").setDescription("a description")
.setPicture(mPlant.default_document().getServerImagePath())
.build();
LE: it looks like the dialog only works with the developer account which generated the app id, the problem is with any other fb account
Thanks in advance
> hope this image makes it clear that unless you make this app live you
> cannot test it from other account.
> There are solutions to add tester
> accounts if you want to test it from any other account instead of developer account,
> then in "Roles" tab add a tester account,then test
> through this account.
Please provide error log so that it's easy to find your bug. But while using Facebook SDK in your app, you need to follow a few procedures:
Register your app on Facebook. After registering you will get a Facebook ID.
After that you need to provide your apps package name and class name in which you are using Facebook.
You need to add your hash key to the Facebook setting page.
Found the answer. It needed Facebook app to be updated. strange thing at least they could have propagated correct message that could have save our time.
I tried restarting my `phone but didn't work. I tried same source code on different 'phone and everything started working. I have no clue on what's wrong in the phone that I was working with.
Hope this could help someone.

TestFlight intergration Android

Unable to receive crash reports on my Test flight account even though application gets crashed.
I integrated the SDK in my application. I did following steps -
1. Integrated SDK in code
2. Used proper Application ID
3. Started session using TestFlight.startSession();
4. Called TestFlight.sendCrash(121213, "XXX", "YYY"); method
4. Ended session using TestFlight.endSession(); in one of my destroy() method.
Let me know if I am doing anything wrong or missing anything.
Thanks in advance, your answers will be much appropriated.
Crash sessions should be sent back to TestFlight automatically. There is no need to specify startSession, sendCrash, and endSession. Please contact TestFlight support here (http://help.testflightapp.com/customer/portal/emails/new) so we can further investigate. Please include the URL to the build's permissions page in the email.
Thanks,
Justin (TestFlight Support)

Facebook OAuth shows "you must log in first"

I want to make MyApp name show on the upper space as Facebook Samples shown.
But even the source code is the same with the sample's, the raw/layout data are the same, too. I don't know why MyApp shows only "You must log in first".
Is anything I missed?
Now I put my whole source code up to the share space: http://qfs.mobi/f689673
And I found it seems not login successful if I input the right information.
Finally, I found the problem..
I change to use the Facebook Sample And run with my app_id. And then I found there are error code when login dialog shows. "This app is in sandbox mode."
God! Isn't sandbox mode for "Developers"? Seems I misunderstand..
Since this a problem is with the webpage shown by the facebook sdk, it doesn't seem to be an issue with your android code, but rather with the way your facebook app is defined in the app center.
The SDK basically redirects you to this link: https://m.facebook.com/dialog/oauth?app_id=xxx&redirect_uri=fbconnect://success (replace xxx with your app_id). Try going to the link when you are not logged in or when you are in incognito mode, you should see the login screen as such: http://imgur.com/xeqigSu
You could check a couple of things:
That your app is live. Check this on your app basic settings page
Try changing the language on the login page and see if that helps, since your app is in a language other than English
go in android setting,then Applications,Manage applications,find your browser and clear data,it works as usual!

Categories

Resources