[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[jx8fb] 01 AccessToken information

"The main entry point of the framework is FacebookSdk class"

| fbLogin loginResult accessToken |
(Smalltalk includesKey: #FacebookSdk) ifFalse: [
	self print: '// The FacebookSdk support is missing. '.
	^self abort
].

MainActivity singleton 
	switchToFragmentNamed: 'FB Login'
	clear: true activate: true. 

fbLogin := MainActivity singleton activeThread coordinator.
fbLogin loginButton performClick. 
loginResult := fbLogin loginResult.

loginResult isNil ifTrue: [
	self print: '// Not logged in. '.
	^self abort
].

accessToken := loginResult accessToken.

#(
	#applicationId
	#declinedPermissions
	#expires
	#lastRefresh
	#permissions
	#source
	#token
	#userId
	#isExpired
) do: [:each | self print: each, '=', (accessToken perform: each) ]