Facebook SDK Wrapper + Native Facebook LoginButton

Douglas Farias

Expert
Licensed User
Longtime User
i found the problem
i have added my app id and name ok

log on ok
my profile ok

i press disconect ok

now i press conect again = hash key problem

now i try add this hash key of the log
hl4hL2scpObNV3IWGAhhjQZ2lfI=

on my app on facebook and this works

conect and disconect conect and disconect no problem ;)

the problem is your hl4hL2scpObNV3IWGAhhjQZ2lfI= << key

i dont know where xD
but i think for all users of this lib need use this
hl4hL2scpObNV3IWGAhhjQZ2lfI=
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
It appears that the samples work only in an emulator.

If you change the app-id and app-name and use your generated hash in your own facebook app settings, it will work :)

I updated the tutorial accordingly.

Enjoy the Facebook SDK Douglas!
 

Douglas Farias

Expert
Licensed User
Longtime User
yes i m using my appname and app id
this works first time like your samples
but later i disconect
hash error

to fix i need add on my app
you hash
hl4hL2scpObNV3IWGAhhjQZ2lfI=
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
This is not my hash. This is a unique generated hash for your own app based on you machine that you compiled it. It is different for every user :)
 

Douglas Farias

Expert
Licensed User
Longtime User
look this image

here is my strings.xml
<resources>
<string name="app_name">Achou Ganhou</string>
<string name="app_id">241820892679231</string>
</resources>


with my keys
151854848w4w4qew
and
kkkkkkkkkk

give me error hash

i have added your hash key
hl4hL2scpObNV3IWGAhhjQZ2lfI=

and works fine =)

i think have a code on your lib with this key
hl4hL2scpObNV3IWGAhhjQZ2lfI=
 

Attachments

  • nao.png
    nao.png
    130.7 KB · Views: 176

Douglas Farias

Expert
Licensed User
Longtime User
This is not my hash. This is a unique generated hash for your own app based on you machine that you compiled it. It is different for every user

a ok
 

Douglas Farias

Expert
Licensed User
Longtime User
i go need use this forever
hl4hL2scpObNV3IWGAhhjQZ2lfI= ?

only with hl4hL2scpObNV3IWGAhhjQZ2lfI= my app works

*-*
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Each new app will have it's own hashkey. And if you compile the app on a different machine, you will have to change the hashkey again since it will be different.

The hashkey is unique per app-id/machine. Whenever any of these 2 factors changes, your hashkey will change as well.

Please test sample1 first which has all features and report any findings :)
 

Douglas Farias

Expert
Licensed User
Longtime User
now is working
i the key hl4hL2scpObNV3IWGAhhjQZ2lfI=
i have sended to 3 of my friends and conect and disconect conect again no problem
i really need use this
hl4hL2scpObNV3IWGAhhjQZ2lfI=

XD

thx for u great lib man

i remember now, not important
on your samples
sample2(folder) have a sample3
sample3(folder) have a sample2
 

Douglas Farias

Expert
Licensed User
Longtime User
@Periklis Koutsogiannis
its possible u make a sample with user photos?

i need to make a option select photo from facebook
and user select a photo *-*

its possible with this lib and its possible u give a example?
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
Update: 1.2

Updated files: facebook.zip

  • Fix: Fixed a Map generation issue that prevented access to Result.Map
 
Last edited:

Douglas Farias

Expert
Licensed User
Longtime User
very thx man put in your examples go help many users =)

3 questions

1° how can i make a login and get my profile automatic?

here is the button to login

B4X:
    Sub facebookimage_Click
    FB.PleaseWaitText = "Conectando ao Facebook..."
    FB.Login(Array As String ("email"))
    pegadadosface
    End Sub

here is the sub to get results
B4X:
Sub pegadadosface
    Dim Result As FacebookResult = FB.Me("")
    If Result.Success Then
    idfacebook = Result.Map.Get("id")
    nomecompletofacebook = Result.Map.Get("name")
    If Result.Map.ContainsKey("email") Then
    emailfacebook = Result.Map.Get("email")
    Else
    emailfacebook = "Email não informado"
    End If
    verificausuario
    Else
    Msgbox(Result.Message, "Ocorreu um erro ao efetuar login, tente novamente!")
    End If
End Sub

ok i make this to try make automatic
1 click on login and i have profile
but dont work i need give 2 clicks at login

can i know if user is loged in and get profile automatic with no click again?


2° question

can i have the post result?
i m using this
Main.FB.PublishPost("testte ssss","http://www.vallow.com.br/achouganhou/","https://scontent-b-gru.xx.fbcdn.net...596_287665921407377_6485402691890065112_n.png","teste nome", "teste caption", "teste descricao aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")

to share on face , and i want to add coins to users when user share

how can i get result if userposted = boolean
its possible know if user publish the post?


3° and on FB.PleaseWaitText = "Conectando ao Facebook..."

can u add the cancelable = false?

FB.PleaseWaitText = "Conectando ao Facebook..., false"
???


sorry for many questions *-*
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
I am refactoring the base class so that what you are requesting will happen automatically.

I will upload v1.3 soon :)
 

Periklis Koutsogiannis

Active Member
Licensed User
Longtime User
@Douglas Farias

Regarding your 2nd question: You can evaluate the Result.Success propery of PublishPost method. If it is true, you can call your custom function.
 
Top