go-facebook
A basic Facebook SDK for Go.
Installation
Install this package by typing go get github.com/jimmysawczuk/go-facebook
in your terminal. You can then use it in your import statement like so:
import (
"github.com/jimmysawczuk/go-facebook"
)
Example
package main
import (
"github.com/jimmysawczuk/go-facebook"
"github.com/jimmysawczuk/go-facebook/types"
"fmt"
)
func main() {
fb := facebook.New("<app id>", "<secret>")
fb.SetAccessToken("<token>")
user, err := fb.GetUser("me")
fmt.Println(user, err)
resp := types.Page{}
err = fb.Get("/starbucks", nil).Exec(&resp)
fmt.Println(resp, err)
}
Documentation
You can find the latest godoc output for this repository at GoDoc.org.
License
go-facebook is released under the MIT license.