{"action":"closed","issue":{"url":"https://api.github.com/repos/abeMedia/shareCount/issues/7","labels_url":"https://api.github.com/repos/abeMedia/shareCount/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/abeMedia/shareCount/issues/7/comments","events_url":"https://api.github.com/repos/abeMedia/shareCount/issues/7/events","html_url":"https://github.com/abeMedia/shareCount/issues/7","id":60319891,"number":7,"title":"site is echoed","user":{"login":"srakl","id":3472875,"avatar_url":"https://avatars.githubusercontent.com/u/3472875?v=3","gravatar_id":"","url":"https://api.github.com/users/srakl","html_url":"https://github.com/srakl","followers_url":"https://api.github.com/users/srakl/followers","following_url":"https://api.github.com/users/srakl/following{/other_user}","gists_url":"https://api.github.com/users/srakl/gists{/gist_id}","starred_url":"https://api.github.com/users/srakl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srakl/subscriptions","organizations_url":"https://api.github.com/users/srakl/orgs","repos_url":"https://api.github.com/users/srakl/repos","events_url":"https://api.github.com/users/srakl/events{/privacy}","received_events_url":"https://api.github.com/users/srakl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-09T09:51:49Z","updated_at":"2015-03-10T00:53:24Z","closed_at":"2015-03-10T00:53:24Z","body":"```php\r\n\t$count = new shareCount;\r\n\t$count->url = 'http://www.abc.com/';\r\n\r\n\t$obj = json_decode($count->get());\r\n    $totalSocialShares = $obj->shares->total; //total social shares\r\n```\r\n\r\nthis code when run, echo's my whole pages source code.\r\n\r\n```php\r\npublic $format = 'json'; \t\t\t// 'json', 'jsonp' or 'xml'\r\n```\r\nhow to get it to just return the json of the shares?\r\n\r\ni did this for a fix, not sure its the right way.\r\n\r\ni added \r\n\r\n```php\r\ncase \"html\":\r\n\t\t\t\t$this->format = 'html';\r\n\t\t\t\t//header (\"Content-Type:text/xml\"); \r\n\t\t\t\tbreak;\r\n```\r\nto the setFormat() function\r\n\r\nand in my config.php\r\n\r\n```php\r\npublic $format = 'html'; \t\t\t// 'json', 'jsonp' or 'xml'\r\n```"}}