{"action":"created","issue":{"url":"https://api.github.com/repos/huandu/facebook/issues/38","labels_url":"https://api.github.com/repos/huandu/facebook/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/huandu/facebook/issues/38/comments","events_url":"https://api.github.com/repos/huandu/facebook/issues/38/events","html_url":"https://github.com/huandu/facebook/issues/38","id":96977290,"number":38,"title":"Is that package support facebook marketing api?","user":{"login":"cention-mujibur-rahman","id":1875512,"avatar_url":"https://avatars.githubusercontent.com/u/1875512?v=3","gravatar_id":"","url":"https://api.github.com/users/cention-mujibur-rahman","html_url":"https://github.com/cention-mujibur-rahman","followers_url":"https://api.github.com/users/cention-mujibur-rahman/followers","following_url":"https://api.github.com/users/cention-mujibur-rahman/following{/other_user}","gists_url":"https://api.github.com/users/cention-mujibur-rahman/gists{/gist_id}","starred_url":"https://api.github.com/users/cention-mujibur-rahman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cention-mujibur-rahman/subscriptions","organizations_url":"https://api.github.com/users/cention-mujibur-rahman/orgs","repos_url":"https://api.github.com/users/cention-mujibur-rahman/repos","events_url":"https://api.github.com/users/cention-mujibur-rahman/events{/privacy}","received_events_url":"https://api.github.com/users/cention-mujibur-rahman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/huandu/facebook/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-24T06:40:46Z","updated_at":"2015-08-13T07:21:08Z","closed_at":"2015-08-01T14:19:41Z","body":"Hi Huandu,\r\nI have a question for this package. Does this package support facebook marketing API's/Facebook adverts?\r\nhttps://developers.facebook.com/docs/marketing-api/reference/v2.4\r\nI found php and python package so wondering if your golang package support this too.\r\nhttps://github.com/facebook/facebook-php-ads-sdk\r\nhttps://github.com/facebook/facebook-python-ads-sdk\r\n\r\nThanks\r\nMujibur"},"comment":{"url":"https://api.github.com/repos/huandu/facebook/issues/comments/130563162","html_url":"https://github.com/huandu/facebook/issues/38#issuecomment-130563162","issue_url":"https://api.github.com/repos/huandu/facebook/issues/38","id":130563162,"user":{"login":"cention-mujibur-rahman","id":1875512,"avatar_url":"https://avatars.githubusercontent.com/u/1875512?v=3","gravatar_id":"","url":"https://api.github.com/users/cention-mujibur-rahman","html_url":"https://github.com/cention-mujibur-rahman","followers_url":"https://api.github.com/users/cention-mujibur-rahman/followers","following_url":"https://api.github.com/users/cention-mujibur-rahman/following{/other_user}","gists_url":"https://api.github.com/users/cention-mujibur-rahman/gists{/gist_id}","starred_url":"https://api.github.com/users/cention-mujibur-rahman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cention-mujibur-rahman/subscriptions","organizations_url":"https://api.github.com/users/cention-mujibur-rahman/orgs","repos_url":"https://api.github.com/users/cention-mujibur-rahman/repos","events_url":"https://api.github.com/users/cention-mujibur-rahman/events{/privacy}","received_events_url":"https://api.github.com/users/cention-mujibur-rahman/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T07:21:08Z","updated_at":"2015-08-13T07:21:08Z","body":"Huandu, No ads api's response is json.\r\nNo need to add new method in sessions as well.\r\nurl := fmt.Sprintf(\"%s/adcampaigns?fields=lifetime_budget,buying_type,name,optimization_goal,campaign_group_id,start_time,end_time,billing_event,is_autobid,campaign_status\", adAccountId)\r\nresults, err := fb.BatchApi(userAccessToken, fb.Params{\r\n\t\"relative_url\": url,\r\n})\r\nlog.Println(results[0].Get(\"body\").(string))\r\nThe batchApi returns:\r\n{\"data\":[{\"lifetime_budget\":\"10000\",\"buying_type\":\"AUCTION\",\"name\":\"SELO, MY - 18+\",\"optimization_goal\":\"PAGE_LIKES\",\"campaign_group_id\":\"7777XX77777\",\"start_time\":\"2015-08-11T10:31:10+0800\",\"end_time\":\"2015-08-12T10:29:00+0800\",\"billing_event\":\"IMPRESSIONS\",\"is_autobid\":true,\"campaign_status\":\"ACTIVE\",\"id\":\"XXXXXXXXXXX111\"}],\"paging\":{\"cursors\":{\"before\":\"NjAzMDgwODcyMTkxNwZDZD\",\"after\":\"NjAzMDgwODcyMTkxNwZDZD\"}}}\r\n\r\nAnd when I authenticating with ads api its needed 1 more scope which is `ads_management or ads_read` \r\nthen after exchanging the token I send this:\r\nparamsForAds := rfb.Params{\r\n\t\t\"method\":       rfb.GET,\r\n\t\t\"relative_url\": \"me/adaccounts\",\r\n}\r\ninto a batch request which responding adaccounts information."}}