Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/sisteamnik/vk_api
###Plus: masking client_id to the iPhone, Android, iPad, Windows Phone clients.
go (golang) api client for vk.com
###Get
go get github.com/yanple/vk_api
// and dependence
go get github.com/PuerkitoBio/goquery
###Import
@import "github.com/yanple/vk_api"
##How to use
###Login/pass auth
var api vk_api.Api
err := api.LoginAuth(
"email/phone",
"pass",
"3087104", // client id
"wall,offline", // scope (permissions)
)
if err != nil {
panic(err)
}
###By user auth (click "allow" on special vk page)
var api vk_api.Api
authUrl, err := api.GetAuthUrl(
"domain.com/method_get_access_token", // redirect URI
"token", // response type
"4672050", // client id
"wall,offline", // permissions https://vk.com/dev/permissions
)
if err != nil {
panic(err)
}
YourRedirectFunc(authUrl)
// And receive token on the special method (redirect uri)
currentUrl := getCurrentUrl() // for example "yoursite.com/get_access_token#access_token=3304fdb7c3b69ace6b055c6cba34e5e2f0229f7ac2ee4ef46dc9f0b241143bac993e6ced9a3fbc111111&expires_in=0&user_id=1"
accessToken, userId, expiresIn, err := api.ParseResponseUrl(currentUrl)
if err != nil {
panic(err)
}
api.AccessToken = accessToken
api.UserId = userId
api.ExpiresIn = expiresIn
###Make query to API
params := make(map[string]string)
params["domain"] = "yanple"
params["count"] = "1"
strResp := api.Request("wall.get", params)
if strResp != "" {
pretty.Println(strResp)
}
All api methods on https://vk.com/dev/methods
###Client ids (Masking only for login/pass auth)
// client_id = "28909846" # Vk application ID (Android) doesn't work.
// client_id = "3502561" # Vk application ID (Windows Phone)
// client_id = "3087106" # Vk application ID (iPhone)
// client_id = "3682744" # Vk application ID (iPad)
Vk_api by Yanple is BSD licensed
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.