{"id":17110532,"url":"https://github.com/stephenyeargin/yammer-oauth2-php","last_synced_at":"2025-04-13T02:32:33.405Z","repository":{"id":2501797,"uuid":"3476567","full_name":"stephenyeargin/yammer-oauth2-php","owner":"stephenyeargin","description":"🗣 PHP wrapper for Yammer's API","archived":false,"fork":false,"pushed_at":"2023-09-23T12:14:49.000Z","size":34,"stargazers_count":10,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T20:49:32.251Z","etag":null,"topics":["hacktoberfest","oauth2","php","yammer"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/stephenyeargin/yammer-oauth2-php","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephenyeargin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-02-18T06:12:31.000Z","updated_at":"2022-05-19T03:39:31.000Z","dependencies_parsed_at":"2024-11-07T18:05:00.740Z","dependency_job_id":"4068a03d-e7a2-4fb1-b912-6e7842a99f43","html_url":"https://github.com/stephenyeargin/yammer-oauth2-php","commit_stats":{"total_commits":16,"total_committers":4,"mean_commits":4.0,"dds":0.4375,"last_synced_commit":"58656ea7b44e86506a74725357f49e80abca8585"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenyeargin%2Fyammer-oauth2-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenyeargin%2Fyammer-oauth2-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenyeargin%2Fyammer-oauth2-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenyeargin%2Fyammer-oauth2-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephenyeargin","download_url":"https://codeload.github.com/stephenyeargin/yammer-oauth2-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248249824,"owners_count":21072457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","oauth2","php","yammer"],"created_at":"2024-10-14T16:27:11.188Z","updated_at":"2025-04-13T02:32:33.157Z","avatar_url":"https://github.com/stephenyeargin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yammer OAuth2 for PHP \n\n[![CI Build and Test](https://github.com/stephenyeargin/yammer-oauth2-php/actions/workflows/ci.yml/badge.svg)](https://github.com/stephenyeargin/yammer-oauth2-php/actions/workflows/ci.yml)\n\nPHP wrapper for Yammer's API.\n\n## Install\n\nInstall with Composer:\n\n```bash\n$ composer require stephenyeargin/yammer-oauth2-php\n```\n\n## Usage\n\nExample configuration array passed to constructor:\n\n```\n$config['consumer_key'] = '1ABCdefhiJKLmnop';\n$config['consumer_secret'] = 'ABCdefhi_JKLmnop';\n$config['callbackUrl'] = 'http://' . $_SERVER['SERVER_NAME'] . '/yammer/callback/';\n\n$yammer = new YammerPHP\\YammerPHP($config);\n```\n\nStarting the callback process:\n\n```php\n// Redirect the user to the OAuth page for your application\nheader('Location: ' . $yammer-\u003egetAuthorizationUrl());\n```\n\nUpgrading the callback code to an authorization token:\n\n```php\n$code = $_GET['code'];\n$token = $yammer-\u003egetAccessToken($code);\n```\n\nUsing the token (either from a fresh process or saved in the database)\n\n```php\n$yammer-\u003esetOAuthToken($token);\n```\n\nMaking a call with the `$yammer` instance:\n\n```php\nif (!$yammer-\u003etestAuth()) {\n    // Handle this.\n}\n\n// Retrieve feed for authenticated user\ntry {\n    $feed = $yammer-\u003eget('messages/my_feed.json');\n    print_r($feed);\n} catch (YammerPHPException $e) {\n    print 'Error: ';\n    print $e-\u003egetMessage();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenyeargin%2Fyammer-oauth2-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephenyeargin%2Fyammer-oauth2-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenyeargin%2Fyammer-oauth2-php/lists"}