Why use Access Token?

50 views
Skip to first unread message

Diego Faria

unread,
Sep 26, 2011, 10:08:00 AM9/26/11
to BatchFB
Hi all,

I'am using restfb as my facebook collector. I need to increase the
performance and i will use batchfb.
I'm trying to do an example and i saw that just exists a constructor
that receives the access token, but i will only use for getting public
posts, that dont need access token.
Does it have a way to get the public posts without passing access
token?

Thanks.

Josh Landin

unread,
Sep 26, 2011, 10:31:17 AM9/26/11
to bat...@googlegroups.com
The Facebook BatchAPI requires the use of an access token, thus the BatchFB implementation requires it.

https://developers.facebook.com/docs/reference/api/batch/

--
Josh

Diego Faria

unread,
Sep 26, 2011, 10:59:29 AM9/26/11
to bat...@googlegroups.com
i have the app id and the app secret but i dont know how to get the access token..

Do you know how?

Im trying with facebook documentation but its not working..


Diego Faria
Desenvolvedor – Software, Tecnologia, SaaS
Informant - Sonhe Alto.
+55 47 3801-0919 | +55 47 8807-9606 
http://www.informant.com.br
  



2011/9/26 Josh Landin <jla...@gmail.com>

Josh Landin

unread,
Sep 26, 2011, 11:06:00 AM9/26/11
to bat...@googlegroups.com
Using BatchFB you can do it like this:

final String token = FacebookBatcher.getAppAccessToken(client_id, client_secret);
final FacebookBatcher batcher = new FacebookBatcher(token);


--
Josh

Diego Faria

unread,
Sep 26, 2011, 4:49:50 PM9/26/11
to BatchFB
Im trying to do this but it dont recognizes the method.
Its saying that FacebookBatcher dont have any static methods.


final String token = FacebookBatcher.getAppAccessToken(client_id,
client_secret);

What can i be doing wrong ?


On 26 set, 12:06, Josh Landin <jlan...@gmail.com> wrote:
> Using BatchFB you can do it like this:
>
> final String token = FacebookBatcher.getAppAccessToken(client_id,
> client_secret);
> final FacebookBatcher batcher = new FacebookBatcher(token);
>
> --
> Josh
>
> On Mon, Sep 26, 2011 at 10:59 AM, Diego Faria
> <diego.fa...@informant.com.br>wrote:
>
>
>
>
>
>
>
> > i have the app id and the app secret but i dont know how to get the access
> > token..
>
> > Do you know how?
>
> > Im trying with facebook documentation but its not working..
>
> >  Diego Faria
> > Desenvolvedor – Software, Tecnologia, SaaS
> > Informant - Sonhe Alto.
> > +55 47 3801-0919 | +55 47 8807-9606
> >http://www.informant.com.br
> > <http://www.linkedin.com/company/informant> <http://twitter.com/InformantNEWS>
> >   <http://www.facebook.com/InformantBR>
>
> > 2011/9/26 Josh Landin <jlan...@gmail.com>

Josh Landin

unread,
Sep 26, 2011, 5:02:35 PM9/26/11
to bat...@googlegroups.com
These methods were introduced in BatchFB 2.1.1. You may need to upgrade, or alternatively use the Facebook Javascript API to get a token.

--
Josh

Diego Faria

unread,
Sep 26, 2011, 5:27:43 PM9/26/11
to BatchFB
Thank you, i was going crazy because cant find this method.

Thank you, now its ok.

Very thanks!

On 26 set, 18:02, Josh Landin <jlan...@gmail.com> wrote:
> These methods were introduced in BatchFB 2.1.1. You may need to upgrade, or
> alternatively use the Facebook Javascript API to get a token.
>
> --
> Josh
>
> On Mon, Sep 26, 2011 at 4:49 PM, Diego Faria
> <diego.fa...@informant.com.br>wrote:
Reply all
Reply to author
Forward
0 new messages