I have developed an Android game that integrates facebook SDK for checking if one has liked and sharing results.
I heard from my mate that he had problem that made him unable to use the like for reward feature on my app, so I decided to install facebook app myself to check out the problem.
For some reason if I am trying to access the fb api reading data from URL "https://api.facebook.com/method/pages.isFan?format=json&access_token=ACCESS_TOKEN&page_id=PAGE_ID" it opens up facebook app on Android which only flashes and then turns off.. How can I avoid this or is there better way to check if one has liked my page in order to give him reward?
I haven't used the Facebook API, but the Facebook app is probably opening because it's listening for broadcast Intents to "api.facebook.com". You could explicitly send the intent to a browser package instead, but this isn't a good solution as there are many browsers.
I would try to do a HTTPS request using a Loader to fetch and parse the json. Have you tried this yet?
I can't paste any code right now, sorry.
From your comment to above Answer , Glad to know that you solved your problem,
Here is the answer for your Question
is there better way to check if one has liked my page
You can surely use FQL - Facebook Query Language to do this, given under the developer documentation in Facebook site.
There are Two different table
1.Page - where you can get all the detail about the page
2.Page_Fan - which you can use to know the fan-id for the page
Related
In my app I have seen that users don't really bother to update the app so I want to encourage them through a dialog requesting them to update the app. The best way possible was to tell them about all the benefits of updating the app but I don't know how to retrieve this information from the Google Playstore.
Any help would be deeply appreciated!
It is best to use the Firebase Notification Center.Please follow the following Official documentation to implement in your app..
Firebase Messaging
There isn't an API to do this in Play at the moment. The way most app developers do this is have their own server where they have information about versions which they require to upgrade, and also can put notifications.
If you haven't done much server side work, maybe check out Firebase from Google. It integrates with the Google Play console, and it should be very quick to get something like this running.
Actually i wanted to make a clone of instagram and show user feed in another way and change the language of app for my own country , but there are several problems with standard instagram api
1.you cannot have user feed
2.you should become live to have user data
i guess some of apps use another api which is based on web version and i think this api fetch data from instagram webVersion or maybe official app,
i searched for a private api and i didn't found something suitable for my Task
i hope you guys could help me to find another instagram api for my job
it's better to be based on java or android
Thanks
I'm a newbie android developer and we have a website that sells some stuff (using a payment gateway), you can also login on the site using credentials, facebook, or google+ login. Now we have a need for an android and iOS app. What is the best approach to port the site functionalities to Android or iOS app? What are the issues I need to consider when I choose one approach? What would be the best approach: native, hybrid (phonegap, xamarine etc.) or using wrapped (using webview as far as I know)? I'm especially interested in the user login part (because I want the user to be able to login to his account if it exists and if not to create it using the website API endpoint - this is how I imagine it), how to solve that when choosing between these approaches? Any suggestions (answers, comments, links, books) would be helpful.
Thanks
My sugestion is to do native, always can reach more performance in multi thread ,high concurrency transactions and heavy applications.
For android, you can build from source an application, and export the html/css content to the smartphone using android.webkit.WebView. Take a look:
https://developer.android.com/reference/android/webkit/WebView.html
I think is a excellent solution for your problem.
I am a total noob on this site so please be patient. I am trying to initiate a Video Chat/Call without any user interaction or confirmation.
I found this:
Uri imUri = new Uri.Builder().scheme("xmpp").authority("gtalk").query("call;type=video").appendPath(email).build();
Intent IM = new Intent(Intent.ACTION_SENDTO);
IM.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
IM.setData(imUri);
startActivity(IM);
from here: https://stackoverflow.com/a/8024626/1184256
This gets me very close, but I then have to click an "Invite" button to continue. Is there a way I can emulate a KeyEvent to click this button or skip the popup window entirely with root access?
I don't even necessarily need to use Google Video Chat if someone has found a different way to initiate a Video call to a certain contact via Skype, Vtok,Fringe, ooVoo or whatever without user interaction.
I have also found OpenTok which after building a sample server and client on my site I have found that it works on desktop browsers but not in Android browsers. Please don't steal/use my apiKey or sessionId.
I have also found libjingle which will allow me to use Google Talk's peer-to-peer voice and video chat. I am thinking this will be the way to go, but it means building a video chat app from the ground up and wrapping it around these libraries... yeah. Anybody done this already?
I know this is essentially a duplicate thread, but I have searched for days and days for an answer and this is the closest I have come to getting this done.
BTW the reason I need this without user interaction is for a Telepresence robot, thus there won't be anybody actually holding/using the phone when I initiate this call.
Please HELP!
You'd have to actually change the built in android app (Talk?) that receives this intent to automatically accept these types of intents. There's no way to do it from a standalone app for security reasons.
I don't think that live video streaming will work natively in Android Browsers, since they dont support WebRTC (Yet) and do not support flash. With that said, OpenTok has an Android SDK in beta that lets you stream live video from android phone to browser, another android phone, or even an iOS phone as long as everyone is connected to the same session. Like you said, this does not work over the browser and you would have to build a native app.
i'm adding facebook post button to my app (phonegap 1.0), it seems that the only method to have this working is using the plugin here:
https://github.com/jos3000/phonegap-plugins/tree/master/Android/Facebook
But it's not working for me, first i saw in the log PluginManager not found, reading the docs it seems plugins are not being loaded like that anymore.
But the intent and dialog of facebook appear when calling
window.plugins.facebook.authorize(appID, function(res){...})
I can see the facebook page being loaded but just after it finished the page automatically goes back with no response.
Anyboy has used succesfully this plugin??. actually the whole phonegap-plugin system seems to be very buggy... but i can't change the framework right now all the rest of the app is working.
At the end i managed to have it working by changing the Facebook authentication option in the java file, not using single sign on.
By the way i do NOT recommend phonegap... it seems to me the library is still full of bugs
I've only ever had very minor issues working with PhoneGap and iOS. Most we were able to find quick workarounds to resolve.
The issue is Android itself. I'm trying to avoid supporting it until Google steps in and enforces standards on every phone device manufacturer. Otherwise, you're guaranteeing yourself a swiss cheese codebase to deal with workarounds on every single device out there.