• Stars
    star
    221
  • Rank 179,773 (Top 4 %)
  • Language
    Objective-C
  • License
    Apache License 2.0
  • Created over 12 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Air Native Extension (iOS and Android) for the Facebook mobile SDK

Air Native Extension for Facebook (iOS + Android)

This is an AIR Native Extension for the Facebook SDK on iOS and Android. It has been developed by FreshPlanet and is used in the game SongPop 2.

Facebook SDK Versions

  • iOS: 4.19.0
  • Android: 4.19.0

Installation

The ANE binary (AirFacebook.ane) is located in the bin folder. You should add it to your application project's Build Path and make sure to package it with your app (more information here). See it within our sample project's app descriptor here.

<extensions>
    ...
    <extensionID>com.freshplanet.ane.AirFacebook</extensionID>
</extensions>

iOS

Be sure to follow steps 1 and 4 of the Getting Started with the Facebook SDK for iOS guide.

Check out the sample project here for app descriptor inclusions.

Android

You will need to add the following activities and permission in your application descriptor:

<android>
    ...
    <manifestAdditions><![CDATA[
        <manifest android:installLocation="auto">
            ...
            <uses-permission android:name="android.permission.INTERNET"/>
            <application>
                ...
                <meta-data android:name="com.facebook.sdk.ApplicationId" 
                           android:value="fb{YOUR_FB_APPLICATION_ID}"/>

                <activity android:name="com.facebook.FacebookActivity" 
                          android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="{YOUR_FB_APPLICATION_NAME}" />

                <activity android:name="com.freshplanet.ane.AirFacebook.LoginActivity" 
                          android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" />

                <!-- If you're sharing links, images or video via the Facebook for Android app, you also need to declarthe   FacebookContentProvider in the manifest. -->
                <provider android:authorities="com.facebook.app.FacebookContentProvider{YOUR_FB_APPLICATION_ID}" 
                          android:name="com.facebook.FacebookContentProvider" 
                          android:exported="true"/>
            </application>
        </manifest>
    ]]></manifestAdditions>
</android>

You can check out our example of this in our sample project here.

NOTE: It is important to prefix YOUR_FB_APP_ID with "fb" in <meta-data> (and ONLY in <meta-data>) tag, because obug in Android manifest file (http://stackoverflow.com/questions/16156856/android-facebook-applicationid-cannot-be-null)Facebook SDK code in this ANE was modified to recognize FB_APP_ID prefixed with "fb".

Using the ANE

Once installed you can initialize the ANE...

Facebook.instance.init("0123456789", _initCallback);

and it will be ready to go! Check out our sample code to aid you.

Build from source

Should you need to edit the extension source code and/or recompile it, you will find an ant build script (build.xml) in the build folder:

cd /path/to/the/ane

# Setup build configuration
cd build
mv example.build.config build.config
# Edit build.config file to provide your machine-specific paths

# Build the ANE
ant

Authors

This ANE has been written by Thibaut Crenn, Alexis Taugeron, Renaud Bardet, and Adam Schlesinger. Rewrites and modifications to version SDK 4.x were made by JΓ‘n HorvΓ‘th.

More Repositories

1

ANE-Push-Notification

Air Native Extension (iOS and Android) for Push Notification
Java
205
star
2

ANE-In-App-Purchase

Air Native Extension (iOS and Android) for In App Purchase
Java
191
star
3

ANE-Network-Info

Air Native Extension (iOS and Android) for getting Network Information
Objective-C
94
star
4

ANE-ImagePicker

Air Native Extension for mobile camera and gallery features (iOS + Android)
Java
80
star
5

ANE-Alert

Air Native Extension (iOS and Android) for Native Alerts
Objective-C
64
star
6

Air-Mobile-ScrollController

Everything you need to have scrolling in your Adobe Air application that feels native on mobile (iOS, Android)
ActionScript
59
star
7

ANE-Video

Air Native Extension (iOS and Android) for playing videos
C
58
star
8

ANE-Google-Play-Game-Services

Enable user to log in with Google+ to upload high score and achievements
Java
57
star
9

ANE-Flurry

Air Native Extension for Flurry Analytics & Ads (iOS + Android)
Objective-C
52
star
10

ANE-DeviceId

Provides access to the device unique id.
C
51
star
11

ANE-Background-Music

Air Native Extension (iOS and Android) for managing background music
Java
42
star
12

ANE-Wizard

Set of tools to speed up the creation of Air Native Extension (ANE).
Python
37
star
13

ANE-Chartboost

Air Native Extension for Chartboost (iOS + Android)
C
36
star
14

ANE-KeyboardSize

Air Native Extension (Android) for measuring soft keyboard size
C
31
star
15

ANE-Crashlytics

Air Native Extension (iOS and Android) for Crashlytics
Objective-C
27
star
16

ANE-DatePicker

Air Native Extension (iOS and Android) for selecting dates with native controls
C
26
star
17

ANE-NativeShare

Brings up the native share dialog
Objective-C
25
star
18

ANE-MultiPeerConnectivity

ANE to detect nearby ios7 devices and send them messages
C
20
star
19

ANE-AACPlayer

Air Native Extension for better media playback on Android
Java
15
star
20

AppEngine-Deferred

Python
11
star
21

ANE-AddressBook

C
11
star
22

ANE-BackgroundFetch

Objective-C
9
star
23

ANE-GoogleCloudStorageUpload

Air Native Extension to upload to google cloud storage with custom headers (iOS + Android)
Java
8
star
24

ANE-Burstly

Air Native Extension (iOS and Android) for Burstly's SkyRocket SDK
Objective-C
7
star
25

AppEngine-SocketPool

Manages a pool of sockets to a same destination in Python on Google AppEngine. Example with Apple Push Notification service.
Python
5
star
26

ANE-AirCapabilities

Provides access to device capabilities for air applications.
Objective-C
4
star
27

ANE-Pinterest

C
4
star
28

AppEngine-Counter

A Counter class to help you track events happening in your application in a simple efficient and scalable way
Python
4
star
29

ANE-LiveStream

Objective-C
4
star
30

ANE-AmazonMP3

Air Native Extension for interacting with the Amazon MP3 app (Android)
Java
3
star
31

AppleMusicANE

Objective-C
1
star