Display my Facebook wall posts

I've been looking at some examples on how to use facebook in your games, however most of the sample is on how to post score to your wall and I was looking for how to display my wall posts.

I'm pretty new at this so I took the tabBar sample and made a new module that would show my wall posts in one of the tabs.

I'm not sure on how to proceed further, I started out with a webView but that showed my entire profile and that was not what I had in mind. So I was thinking if I could add my wall post to a widget scrollView?

I thought this would be a fun thing to share with my friends since I don't have a website or a blog so they could get my app instead.

After reading about FB graphs, that honestly didn't make no sense to me. I did figured out I need to create an appID etc and so I did. FB uses json so I required that since it's built into corona.

So now I have my appID, appSecret and a nameSpace. But what is an accessToken?

"https://graph.facebook.com/me/feed?access_token=" Should I put my appID here?

I would be very thankful if anyone could help me out with this..

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module(..., package.seeall)
 
local facebook = require("facebook")
local json = require("json")
local widget = require("widget")
 
function new()
        local g = display.newGroup()
        local background
        local myScrollView = widget.newScrollView
        local myAppID = "123456789"
 
       background = display.newRect(0, 0, 320, 480)
       background:setFillColor(255, 255, 255)
       g:insert(background)
        
       myScrollView = newScrollView{ 
                         x = 0, 
                         y = 0, 
                        width = 320 , 
                        height = 480,
                        }
                        
                  g:insert(myScrollView.view)
        
        facebook.login(myAppId, fbListener)
        
        local function = fbListener(event)
             if("session" == event.type) then
                if("login" == event.phase) then
                  facebook.request("me/feed", "GET")
              end
           end
        end
        
        
        function g:cleanUp()
 
                g:removeSelf();
                g = nil;
                
                print("cleaning");
        
        end
        
        return g
end

Also, another question.
Do I really need to make the user login to their FB account just to look at my wall? I understand they have to if they want to comment or like but since my profile is public then they shouldn't need to login right?

So I would basically just add a login button to the toolBar to take care of that.

views:1518 update:2011/10/19 8:59:29
corona forums © 2003-2011