0

I'm trying to get infos from a public page, but can't get anything, it says always that I need an access token. How can I retrieve public info without asking the user to login to Facebook?

var request = "1537823733106575?fields=about"
    let graphRequest : FBSDKGraphRequest = FBSDKGraphRequest(graphPath: request, parameters: nil)
    graphRequest.startWithCompletionHandler({ (connection, result, error) -> Void in
        if ((error) != nil)
        {
            // Process error
            println("Error: \(error)")
        }
        else
        {
            //println(result)
        }
    })

Here's an example code, I'm using Facebook SDK 4.01 and Swift.

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
MauroMaxxa
  • 49
  • 2
  • 7

1 Answers1

1

You can get a short lived access token https://developers.facebook.com/tools/explorer/ then turn that into a long lived access token using Get long live access token from Facebook. This access token will be associated with your user id.

Community
  • 1
  • 1