2016-03-04 23:27:54 +03:00
|
|
|
:: Test url +https://graph.facebook.com/v2.5/me
|
|
|
|
::
|
|
|
|
:::: /hoon/graph/facebook/com/sec
|
|
|
|
::
|
2016-01-26 01:49:38 +03:00
|
|
|
/+ oauth2
|
2016-01-20 03:03:24 +03:00
|
|
|
::
|
|
|
|
::::
|
|
|
|
::
|
2016-03-04 23:35:56 +03:00
|
|
|
=+ ^= aut
|
|
|
|
%+ oauth2
|
|
|
|
dialog='https://www.facebook.com/dialog/oauth?response_type=code'
|
|
|
|
exchange='https://graph.facebook.com/v2.3/oauth/access_token'
|
2016-03-04 23:33:01 +03:00
|
|
|
|_ {bal/(bale keys.aut) access-token/token.aut}
|
2016-01-23 06:06:46 +03:00
|
|
|
++ auth ~(. aut bal /'user_about_me'/'user_posts')
|
2016-03-04 23:33:01 +03:00
|
|
|
++ out (out-quay:auth key='access_token' value=access-token)
|
2016-01-23 06:06:46 +03:00
|
|
|
++ in in-code:auth
|
2016-01-20 03:03:24 +03:00
|
|
|
++ bak
|
2016-01-27 00:27:58 +03:00
|
|
|
%- (bak-parse:auth . access-token.aut expires-in.aut ~)
|
2016-03-04 23:33:01 +03:00
|
|
|
|= {access-token/@t expires-in/@u}
|
2016-01-26 23:32:52 +03:00
|
|
|
?: (lth expires-in ^~((div ~d7 ~s1))) :: short-lived token
|
2016-03-04 23:33:01 +03:00
|
|
|
%^ toke-req:auth grant-type='fb_exchange_token'
|
|
|
|
[key='fb_exchange_token' value=access-token]
|
|
|
|
~
|
2016-01-26 23:32:52 +03:00
|
|
|
[[%redo ~] ..bak(access-token access-token)]
|
2016-01-28 03:25:05 +03:00
|
|
|
::++ wyp ~
|
2016-01-20 03:03:24 +03:00
|
|
|
--
|