How to getNewsFeed from a default facebook User

25 views
Skip to first unread message

Gordons

unread,
Oct 22, 2013, 6:25:04 AM10/22/13
to codenameone...@googlegroups.com
I am creating an application that will be displaying NewsFeed from a particular User.
I tried to use this :

try {
            FaceBookAccess.anonymousLogin(clientID, clientSecret);
        } catch (Exception e) {
            e.printStackTrace();
        }

        try {
            FaceBookAccess.getInstance().getNewsFeed(facebookUsername, (DefaultListModel) news.getModel(), new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    c.removeAll();
                    c.addComponent(BorderLayout.CENTER, news);
                    c.revalidate();
                }
            });
        } catch (IOException ex) {
            ex.printStackTrace();
        }

but its not working

Shai Almog

unread,
Oct 22, 2013, 12:54:01 PM10/22/13
to codenameone...@googlegroups.com
This will only work for public posts e.g. like pages. This probably won't work for people due to the anonymous login. You will need to use OAuth login to show a persons newsfeed.

Agada Godwin

unread,
Oct 22, 2013, 12:59:31 PM10/22/13
to codenameone...@googlegroups.com
Thanks Shai,

it's actually a public post I am trying to read. How can I make it work?


On Tue, Oct 22, 2013 at 5:54 PM, Shai Almog <shai....@gmail.com> wrote:
This will only work for public posts e.g. like pages. This probably won't work for people due to the anonymous login. You will need to use OAuth login to show a persons newsfeed.

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/bm6GzKtfHJk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/4ab7f92a-9be9-44d7-ad1d-1c0ebf7795e1%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Shai Almog

unread,
Oct 23, 2013, 2:54:33 AM10/23/13
to codenameone...@googlegroups.com
I'm not sure if its possible, I only used this for pages where it should work.
Maybe Chen knows something here.

I suggest you check it with pages (e.g. CodenameOne) if that works then its a Facebook thing.

Chen Fishbein

unread,
Oct 23, 2013, 3:05:06 AM10/23/13
to codenameone...@googlegroups.com
it's only possible on pages, facebook blocks this unless the user logged in.
Reply all
Reply to author
Forward
0 new messages