forked from huandu/facebook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update doc and move App and Session to standalone files.
- Loading branch information
Showing
7 changed files
with
530 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
A Facebook Graph API Library In Go | ||
================================= | ||
|
||
This is a Go library supports Facebook Graph API and FQL. It's simple but powerful. | ||
|
||
Quick Tutorial | ||
--------------- | ||
|
||
```go | ||
import ( | ||
"fmt" | ||
fb "github.com/huandu/facebook" | ||
) | ||
|
||
func main() { | ||
res, _ := fb.Get("/538744468", fb.Params{ | ||
"fields": "username", | ||
}) | ||
fmt.Println("here is my facebook username:", res["username"]) | ||
|
||
// It's easy to decode "username" to a go string too. | ||
var username string | ||
res.DecodeField("username", &username) | ||
fmt.Println("alternative way to get username:", username) | ||
|
||
// It's also possible to decode the whole result into a predefined struct. | ||
// Assume the struct is defined as following: | ||
// type User struct { | ||
// Username string | ||
// } | ||
// | ||
// Then, you can use following code to fill struct with values in result. | ||
// var user User | ||
// res.Decode(&user) | ||
} | ||
``` | ||
|
||
For more document, please read http://godoc.org/github.com/huandu/facebook or use `go doc`. | ||
|
||
Get It | ||
------ | ||
|
||
Use `go get github.com/huandu/facebook` to get and install it. | ||
|
||
Out of Scope | ||
------------ | ||
|
||
1. No OAuth integration. | ||
2. No old RESTful API support. | ||
|
||
License | ||
------- | ||
|
||
This library is licensed under MIT license. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.