Facebook SDK Wrapper + Native Facebook LoginButton

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Update: 2.2

  • Restructured due to a conflict with AdMod library and FacebookProvider has its own package. Please read the Getting started for updated installation instructions!
 
Last edited:

Douglas Farias

Expert
Licensed User
Longtime User
@Periklis Koutsogiannis
hi man i have tested and i have the same error
i have make the download now make the tutorial again and same error on your samples i cant add admob too
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
You have to put the new socialapi.jar and socialapi.xml from the wrappers folder into your B4A libraries folder and overwrite the old one.
 

Douglas Farias

Expert
Licensed User
Longtime User
in this app onli facebook
i have download this

facebook/wrapper < this extract on b4a lib folder
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
I have this in my test project

B4X:
#Region Project Attributes 
    #ApplicationLabel: sample1
   
    #SupportedOrientations: Portrait
    #CanInstallToExternalStorage: False 

    #AdditionalRes: C:\android\sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms

    #AdditionalRes: ..\AppConfig

    #AdditionalRes: C:\b4a-dev\socialapi\facebook\sdk\res
    #AdditionalJar: C:\b4a-dev\socialapi\facebook\sdk\facebooksdk.jar
#End Region

and FacebookProvider (2.20), SocialApi (2.20) checked and it compiles fine.
 

Douglas Farias

Expert
Licensed User
Longtime User
in your sample here give the problem

B4X:
#Region Project Attributes
    #ApplicationLabel: sample1
  
    #SupportedOrientations: Portrait
    #CanInstallToExternalStorage: False

    #AdditionalRes: ..\AppConfig

    #AdditionalRes: C:\b4a-dev\fbsdk\res
    #AdditionalJar: C:\b4a-dev\fbsdk\facebooksdk.jar
    #AdditionalRes: C:\Program Files (x86)\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
#End Region


FacebookProvider (2.20), SocialApi (2.20)
 

Douglas Farias

Expert
Licensed User
Longtime User
AddManifestText(
<uses-sdk
android:minSdkVersion="4" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)

AddApplicationText(
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/app_id"/>
<activity
android:name="com.facebook.LoginActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:label="$LABEL$"/>)

SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")


'AdMob
AddApplicationText(
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

)
'End of AdMob
 

Douglas Farias

Expert
Licensed User
Longtime User
yes is your sample1 facebook
i have download this now and only put admob

dont have google plus checked
 

Douglas Farias

Expert
Licensed User
Longtime User
here is test in your pc pls

admob v2
 

Attachments

  • sample1.zip
    115.4 KB · Views: 172

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
It compiles fine. Check the ads in the bottom. Have your reloaded the libraries? Is the version of the socialapi 2.20 ?

upload_2014-7-6_3-27-26.png
 

Douglas Farias

Expert
Licensed User
Longtime User
what your b4a version ?
3.82 ?
 

Attachments

  • Sem título.png
    Sem título.png
    123.3 KB · Views: 144

Douglas Farias

Expert
Licensed User
Longtime User
in the sample uploaded have this

Parsing code. 0.03
Compiling code. 0.20
Compiling layouts code. 0.05
Generating R file. 0.22
Compiling debugger engine code. 0.72
Compiling generated Java code. Error
B4A line: 46
Activity.AddView(Adbox, 0dip, 100%y - height, 100%x, height)
javac 1.7.0_60
src\com\datasteam\b4a\facebook\sample1\main.java:371: error: cannot access AdView
mostCurrent._activity.AddView((android.view.View)(mostCurrent._adbox.getObject()),anywheresoftware.b4a.keywords.Common.DipToCurrent((int) (0)),(int) (anywheresoftware.b4a.keywords.Common.PerYToCurrent((float) (100),mostCurrent.activityBA)-_height),anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (100),mostCurrent.activityBA),_height);
^
class file for com.google.android.gms.ads.AdView not found
1 error

i go try fix this =(
 
Top