Integrating Facebook into an Android app for advertising via Facebook - android

I have an existing Android app which I am trying to advertise via Facebook ads. Facebook said I must integrate their library into my app, starting with downloading their SDK.
When I downloaded their SDK from here: http://developers.facebook.com/android/ there was no .jar files in it but examples of apps using their classes.
I think for my purposes I just need to make a call to Facebook when my app starts up, right? Because I don't want any Facebook functionality. I just want to be able to intgrate enough to b able to advertise in their system.
Could anyone please help me understand what I need to do?
Should I just copy all the classes in their Facebook/com/src folder into my own project? And if so, where do I add the access key and secret key for my Facebook app into my Android app?
Thanks!
- Alex

The Facebook SDK is not a simple jar file, but is instead an Android Library. If you're using eclipse, you need to import the SDK into your workspace, and add it as a library to your project.
See the google docs on how to add a library http://developer.android.com/tools/projects/projects-eclipse.html
And also the Facebook SDK Getting Started guide https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/

Related

Can not find xml layout file in libgdx project

I am working on a project in Android Studio. I was following a tutorial for Facebook Login for Android (https://developers.facebook.com/docs/facebook-login/android).
And To add the Facebook Login button, first, it had to be added in layout XML file with the full class name, com.facebook.widget.LoginButton. But I can't find it anywhere. I even tried with Double shift shortcut, still no success.
Am I doing something wrong? If yes, please guide me in right direction or if there is another alternative approach to add facebook login button.
Thanks.
Your link is specifically for Andoid platform. You need to login with code and interact with core module using interfacing but this is for Android only.
As we know LibGDX is cross platform game development framework so we have to write facebook specific code on all other platform.
Good news is someone already done for you, you've to use only with Apache License 2.0. Use gdx-facebook, A libGDX extension providing cross-platform support for Facebook Graph API.
LibGdx is cross platform game development platform and all supported platform under libGDX is not supporting .xml file. So you have 2 way:
(1) Using interface you can easily integrate facebook
(2) Use LibGDX's Facebook supported graph API.TomGril-LibGDX - facebook

Using API's in android studio

I'm currently working on an app that requires match data from tinder but I have never worked with API's before and I'm not too sure how it works. I found some projects on github using the tinder api which I will link at the end there are just some parts that confuse me. Firstly all of the files are in python so is there a way I can implement that in a java file in android studio? Also it says that facebook authentication is required for the api to work so would having the user log into the app with facebook solve that issue?
https://github.com/fbessez/Tinder

Login Via Facebook in Android

I am developing an Android app in which user will have choice that he/she can Login in main app using a Facebook account (FB Login). I came to this tutorial in this link.
While developing the app, I came to an error in a .java file that:
the Facebook class is not available. Create Facebook class.
I am not getting anything as I have already included Facebook Android SDK in my project.
What am I missing?
First check Library in your project's properties-> android. In library Add facebook(com_facebook_android) library.

how to integrate Facebook API in Android Application?

I am developing a mobile social TV application on Android.I want to integrate Facebook with my application so that I can:
Share things on Facebook
Send request to friends on Facebook to join the application
You may use this.
Facebook Android SDK
But carefull about handling activity result. If you test integration in simulator you haven't installed facebook app. and sdk will show you a dialog with webview. But on a real phone if facebook app. is installed, authorization will go via app.
you need to install an extension, similar to the core Android SDK, but no, here is what you need to do:
1.) go to https://github.com/facebook/facebook-android-sdk
2.) download the facebook directory ONLY! The other directories are only examples.
3.) Put the files from the src (you can copy the drawables too, if you want to) in the package, you are currently working with
4.) You are good to go, you can use the facebook "SDK"
see also these examples https://github.com/facebook/facebook-android-sdk/tree/master/samples , it is working example provided by facebook

Facebook APIs for Android

How can we get Facebook APIs for Android?
I would suggest using the following SDK put together as an open source project. You will need to get a facebook api key directly from facebook.
https://github.com/facebook/facebook-android-sdk
If you plan on working with Facebook and other APIs in your Android app, you might consider the Temboo SDK which provides normalized access to Facebook and many other APIs. The Android SDK is an open download (https://www.temboo.com/download) although you'll need a (free) Temboo account to do anything with it.
(Full disclosure: I work at Temboo)

Categories

Resources