Facebook SDK Wrapper + Native Facebook LoginButton

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User

Douglas Farias

Expert
Licensed User
Longtime User
i m using socialapi (2.31) but
Parsing code. 0.06
Compiling code. Error
Error compiling program.
Error description: Unknown member: haspermission
Occurred on line: 518
If Common.fb.HasPermission(Common.fb.Constants.Permissions.PUBLISH_ACTIONS) Then
Word: haspermission
 

Douglas Farias

Expert
Licensed User
Longtime User
ok i have checked again and now i see

but

Parsing code. 0.07
Compiling code. 0.13
Compiling layouts code. 0.03
Generating R file. 0.20
Compiling debugger engine code. 1.91
Compiling generated Java code. Error
B4A line: 518
If Common.fb.HasPermission(Common.fb.Constants.Permissions.PUBLISH_ACTIONS) Then
javac 1.7.0_60
src\achou\ganhou\vallow\telaprincipal.java:1587: error: cannot find symbol
if (mostCurrent._common._fb.HasPermission(mostCurrent._common._fb.Constants.Permissions.PUBLISH_ACTIONS)) {
^
symbol: method HasPermission(String)
location: variable _fb of type FacebookProvider
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Have you deleted all previous FacebookProvider, GooglePlusProvider, InstagramProvider and TwitterProvider xml and jar files from your B4A lib folder?
 

Douglas Farias

Expert
Licensed User
Longtime User
Have you deleted all previous FacebookProvider, GooglePlusProvider, InstagramProvider and TwitterProvider xml and jar files from your B4A lib folder?

nops, i have deletd now i go test
 

Douglas Farias

Expert
Licensed User
Longtime User
@Periklis Koutsogiannis

now compile ok

but on s3

B4X:
Dim Result As FacebookResult = Common.FB.PublishPost("Confira o aplicativo que distribui dinheiro pela cidade. Lançamento em BREVE!!!","http://www.vallow.com.br/achouganhou/", "http://www.vallow.com.br/achouganhou/compartilhar.png" ,"Achou Ganhou", "www.vallow.com.br/achouganhou", "O aplicativo que distribui dinheiro pela cidade confira!")
If Result.Canceled Then Return

If Result.Success Then
    updatecompartilhou
Else 
    If Common.fb.HasPermission(Common.fb.Constants.Permissions.PUBLISH_ACTIONS) Then
        Common.fb.RequestPublishPermissions
    Else
        Msgbox("Erro ao compartilhar tente novamente!", "Achou Ganhou")
    End If
End If

show me

Msgbox("Erro ao compartilhar tente novamente!", "Achou Ganhou")
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Upps. The code I gave you should be:

B4X:
If Not(Common.fb.HasPermission(Common.fb.Constants.Permissions.PUBLISH_ACTIONS)) Then
    Common.fb.RequestPublishPermissions
Else
    Msgbox("Erro ao compartilhar tente novamente!", "Achou Ganhou")
End If
 

Douglas Farias

Expert
Licensed User
Longtime User
@Periklis Koutsogiannis
i have tested now on s3 and
when i click to share show me facebook
loading gif
close facebook screenn
and is this

dont make
updatecompartilhou

and dont show
Msgbox("Erro ao compartilhar tente novamente!", "Achou Ganhou")
 

Douglas Farias

Expert
Licensed User
Longtime User
same =(
Msgbox("Erro ao compartilhar tente novamente!", "Achou Ganhou")

tested on galaxy trios too
Msgbox("Erro ao compartilhar tente novamente!", "Achou Ganhou")

only on moto g works fine *-*
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
The flow is somehow wrong.

Can you please tell me what is the code when you click on the "COMPARTILHAR NO FACEBOOK" button?
 

Douglas Farias

Expert
Licensed User
Longtime User
when you click on compartilhar no facebook show make a query to check if user already shared
because u can share 1 time and you won 10 coins but u can share only 1 time


when you click make a query to check later i get the value

1 = already shared can share again
0 = can share

if is 0 show
question = Msgbox2("Compartilhe o aplicativo Achou Ganhou e ganhe 2 vallow coins!", "Achou Ganhou", "Compartilhar", "Cancelar","", Null)


B4X:
        Case "compartilhouresultado"       
        Dim listaface3 As List
        Dim parserface3 As JSONParser
        Dim mface3 As Map
        Dim usuariocompartilhou As Int   
        mface3.Initialize
        parserface3.Initialize(respostadoservidor)
        listaface3.Initialize
   
        listaface3 = parserface3.NextArray
        mface3 = listaface3.Get(0)
        usuariocompartilhou = mface3.Get("Compartilhou")
       
        If usuariocompartilhou = 0 Then
        Private question As Int
        question = Msgbox2("Compartilhe o aplicativo Achou Ganhou e ganhe 2 vallow coins!", "Achou Ganhou", "Compartilhar", "Cancelar","", Null)
        If question = DialogResponse.Positive Then
Dim Result As FacebookResult = Common.FB.PublishPost("Confira o aplicativo que distribui dinheiro pela cidade. Lançamento em BREVE!!!","http://www.vallow.com.br/achouganhou/", "http://www.vallow.com.br/achouganhou/compartilhar.png" ,"Achou Ganhou", "www.vallow.com.br/achouganhou", "O aplicativo que distribui dinheiro pela cidade confira!")
If Result.Canceled Then Return

If Result.Success Then
    updatecompartilhou
Else
If Not(Common.fb.HasPermission(Common.fb.Constants.Permissions.PUBLISH_ACTIONS)) Then
    Common.fb.RequestPublishPermissions
Else
    Msgbox("Erro ao compartilhar tente novamente!", "Achou Ganhou")
End If
End If
           
           
       
        End If
   
        Return
        Else
        Msgbox("Você já compartilhou o aplicativo usando esta conta!","Achou Ganhou")
        Return
        End If
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Wait.

Facebook requires that publish_actions permission must be reviewed by them before the app is released to the public. That means that only developers or testers of the app will be able to grant that permission.

Are you using the same facebook account (your developer account) on the S3?

upload_2014-7-7_7-47-21.png
 

Douglas Farias

Expert
Licensed User
Longtime User
Wait.
Facebook requires that publish_actions permission must be reviewed by them before the app is released to the public. That means that only developers or testers of the app will be able to grant that permission.

Are you using the same facebook account (your developer account) on the S3?

nop another facebook
 
Top