Haris I would just help! I had not yet read about your problem (which is my own). And I was just looking for a similar solution, can you give me some help? I would be grateful!Vincenzo,
Not sure if you were asking a question here or offering me help(in which case thanks!). However, if you were asking whether you can use GET for FB integration, the answer is yes as I've just finished doing that.
I am using a combination of WebView and HttpUtils to acquire the access token that you need for posting to FB on a user's behalf. Would be glad to help if you need so
All the best.
Vincenzo,
I have added an example project with some description and details of how you can use Facebook's login and do a status post. Here is the link to that example: http://www.b4x.com/android/forum/threads/using-facebook-login-without-social-sdk.44752/
I did not want to keep using this thread for discussion which is essentially about *not* using this SDK! Hope this will be helpful.
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
** Activity (main) Resume **
ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{41c9d428: android.os.BinderProxy@42128820}}
** Activity (main) Pause, UserClosed = false **
Sub Activity_Resume
ThisActivity.InitializeAndBind(Social.Providers, "provider")
End Sub
Sub Provider_Event (Provider As SocialApiProvider)
'Since this event will be raised by all providers, we don't want to process events
'from other providers if we are already connected
If Social.ActiveProvider <> Null AND Social.ActiveProvider <> Provider Then Return
End Sub
Sub Provider_Connected (Provider As SocialApiProvider)
Dim u As User
Dim userEmail As String = Provider.User.Email
Dim nick As String = Provider.User.Name
Dim fullName As String
Dim gender As String
Dim birth As Long
Dim userAge As Int
Dim tmp As String
Dim p As Period
Dim minAge As Int
Dim maxAge As Int
Dim ageMap As Map
If Provider Is FacebookProvider Then
Dim fb As FacebookProvider
Dim Temp As FacebookResult
Temp = fb.GetMe(Array As String(fb.Constants.UserFields.FIRST_NAME, fb.Constants.UserFields.LAST_NAME, _
fb.Constants.UserFields.gender, fb.Constants.UserFields.BIRTHDAY, _
fb.Constants.UserFields.AGE_RANGE))
Dim data As Map = Temp.Map
fullName = data.Get(fb.Constants.UserFields.FIRST_NAME) & " " & data.Get(fb.Constants.UserFields.LAST_NAME)
gender = data.Get(fb.Constants.UserFields.gender)
gender = gender.ToLowerCase.SubString2(0, 1)
tmp = data.Get(fb.Constants.UserFields.BIRTHDAY)
If tmp <> Null Then
birth = DateTime.DateParse(tmp)
userAge = DateUtils.PeriodBetween(birth, DateTime.Now).Years
Else
If data.ContainsKey(fb.Constants.UserFields.AGE_RANGE) Then
ageMap = data.Get(fb.Constants.UserFields.AGE_RANGE)
If ageMap.ContainsKey("min") AND ageMap.ContainsKey("max") Then
If ageMap.Get("max") <> "" Then
userAge = ((minAge + maxAge) / 2)
Else
userAge = minAge
End If
Else
' No age info
End If
End If
End If
' Request publishing perms
fb.RequestPublishPermissions
End If
If Provider Is TwitterProvider Then
Dim t As TwitterProvider
Dim Temp As FacebookResult
Temp = t.GetMe
Dim data As Map = Temp.Map
End If
' Build our own user object here
End Sub
Sub Provider_Disconnected (Provider As SocialApiProvider)
End Sub
Sub Provider_Failed (Provider As SocialApiProvider)
If Msgbox2("Provider '" & Provider.Type & "' failed to actualize your details."&CRLF&CRLF&"Retry?", Provider.Type & ": Error", "Yes", "No", "", Null) = DialogResponse.POSITIVE Then
Provider.Retry
End If
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?