Android Facebookdialog disappearing instantly - android

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.

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.

"Page not found" when a user clicks on a Facebook invite from my application

I'm not sure if this is a programming related problem or not, but as I have no experience with the Facebook SDK I'm just assuming that I did something wrong somewhere, even though I've followed the documentation to the T.
I am using the Unity SDK for anybody that is curious, and I am using the FB.AppRequest to send the invite to the application, the code in my application looks exactly like that in the documentation.
public void InviteFriends() {
FB.AppRequest(
message: "Come play this great game!",
callback: LogCallback
);
}
void LogCallback(FBResult result) {
Debug.Log("Callback was called: " + result.Text);
}
This brings up the box as expected and allows me to invite a friend, and the friend does get the invite, however once they click on the invite they are redirected to a page that looks like this:
Which is causing quite a bit of problems for me; I've checked everything in the application panel and it seems like everything checks out. My google play identifier is correct as-well as my Class Name. My key hashes are all correct. I don't know what else I can do. If you'd like to look up my bundle identifier on the play store it's buzz.qualify and I'm sure that you'll find it with ease.
I should also add that I have an application page which can be found here: https://www.facebook.com/pages/Qualify/1647231425506903?fref=ts
This page is linked to the facebook application in the developer console as-well.
What can I do to resolve this issue? Is it in the code? Please help, this has been a 4 day long set-back and we're losing progress rapidly because of it.
It's been a few days now, we're now paying someone for a fix through paypal.
Do you have Canvas App setup on Facebook for your Android Game?
If not, read
Requirements for Invitable Friends.
It states that your game request will...
direct recipients to one of the following places:
Your app on Facebook Canvas.
Your native app on iOS or Android, if installed.
The Apple App Store or Google Play, if not installed.

Track APP Installs from Facebook

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.

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!

Facebook login problems current goals screen not generating oath token

I am a newbie and devleoping an app which uses facebook login and the details which we get after logging from facebook for further interactions. Two days back it was running fine but today it stopped running its just showing CURRENT GOALS screen and no button to do ok or cancel or anything of that sort. Just see this link
https://m.facebook.com/dialog/oauth?redirect_uri=fbconnect%3A%2F%2Fsuccess&display=touch&type=user_agent&client_id=307234779396415&ret=login&ext=1368864103&hash=AeZ9mMBQfC22WXj_&refid=9&_rdr
I am using the Facebook Dialog class to achieve the login but in the facebook sdk also the graphSampleApi sample project is running with same problem.
Please help I need to the login badly and my project deadline is today. Please help.
Thanks in advance.
try this simplier URL for log in ::
https://www.facebook.com/dialog/oauth?client_id=307234779396415&redirect_uri=https://www.facebook.com/connect/login_success.html&display=touch&scope=publish_stream
See my answer on this similar/duplicate question: FbDialog doesn't show full content on smaller devices
Basically, it looks like Facebook changed the code in these web dialogs and something in their javascript is not executing properly on some Android devices. The Cancel/OK buttons are there in the page content, but hidden, and the javascript is failing before the buttons are shown.
You can inject JavaScript to hide the "Current Goals" until FaceBook fixes their API.
See my answer here for details:
webDialog "CURRENT GOALS" header but no button to authorize or cancel

Categories

Resources