{"id":36335370,"url":"https://github.com/omarrida/socializer","last_synced_at":"2026-01-11T12:05:51.822Z","repository":{"id":56950092,"uuid":"136621615","full_name":"omarrida/socializer","owner":"omarrida","description":"Automatically create social media post from Laravel models and post them via Buffer!","archived":false,"fork":false,"pushed_at":"2018-06-09T23:37:32.000Z","size":374,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-22T17:13:19.403Z","etag":null,"topics":["bufferapp","eloquent","image-manipulation","laravel","marketing-automation"],"latest_commit_sha":null,"homepage":null,"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/omarrida.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}},"created_at":"2018-06-08T13:20:08.000Z","updated_at":"2024-04-22T17:13:19.404Z","dependencies_parsed_at":"2022-08-21T09:20:24.635Z","dependency_job_id":null,"html_url":"https://github.com/omarrida/socializer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/omarrida/socializer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarrida%2Fsocializer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarrida%2Fsocializer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarrida%2Fsocializer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarrida%2Fsocializer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omarrida","download_url":"https://codeload.github.com/omarrida/socializer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omarrida%2Fsocializer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28302326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T11:18:18.743Z","status":"ssl_error","status_checked_at":"2026-01-11T11:07:56.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bufferapp","eloquent","image-manipulation","laravel","marketing-automation"],"created_at":"2026-01-11T12:05:45.304Z","updated_at":"2026-01-11T12:05:51.805Z","avatar_url":"https://github.com/omarrida.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Socializer\n\nAutomatically create social media post from Laravel models and post them via Buffer!\n\n\u003e Warning: This package has not been thoroughly tested and is still in development. Semantic versioning is not followed at this stage.\n\n## Installation\n\n```\ncomposer require audiogram/socializer\n```\n\nThen publish the vendor files.\n\n```\nphp artisan vendor:publish\n```\n\nAdd your Buffer credentials to the `config/socializer.php` file.\n\n```php\n'buffer_credentials' =\u003e [\n        'client_id'     =\u003e env('BUFFER_CLIENT_ID'),\n        'client_secret' =\u003e env('BUFFER_CLIENT_SECRET'),\n        'access_token'  =\u003e env('BUFFER_ACCESS_TOKEN'),\n    ],\n\n    'buffer_profile_ids' =\u003e [\n        'facebook' =\u003e env('BUFFER_FACEBOOK_PROFILE_ID'),\n        'twitter'  =\u003e env('BUFFER_TWITTER_PROFILE_ID'),\n    ],\n```\n\nYou should be all set now.\n\n## Usage\n\nPick a model that you'd like to start creating social media posts for. In this example, we'll use a model called `Event` which might represent a local event listed on your app.\n\nSimply add the `SocializableInterface` on your model and implement the `toSocializable()` method.\n\n```php\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Audiogram\\Socializer\\SocializableInterface;\n\nclass Event extends Model implements SocializableInterface\n{\n  protected $fillable = ['name', 'location', 'image_url'];\n  \n  // ...\n  \n  public function toSocializable(): Audiogram\\Socializer\\Socializable\n  {\n    return (new Socializable())\n      // Set the background image\n      -\u003ebackgroundImagePath($this-\u003eimage_url)\n      // Set the image overlay text\n      -\u003etextOverlay($this-\u003ename)\n      // Set the text for your post\n      -\u003epostText('Checkout our latest event ' . $this-\u003ename . ' taking place at ' . $this-\u003elocation);\n  }\n}\n```\n\nYour model is now considered \"socializable\". To actually create a social media post and send it to Buffer, you can use this handy helper method. This is especially useful if you want to define an Eloquent event and call it from there. A good example is throwing an Eloquent event on model created where you pass the newly created model to the helper method and create a social media post on the fly.\n\n```php\n$event = Event::first();\nsocialize($event);\n```\n\nCongratulations! Your post has been created with the attached image and desired post text and sent to your Buffer account.\n\n## Requirements\n\nSocializer depends on the packages below.\n\n```\nintervention/image: ^2.4\nguzzlehttp/guzzle: ^6.3\n```\n\n## Issues\n\nIf you find yourself stuck, encounter a bug, or have any questions/suggestions for improving this package, feel free to create an issue on GitHub and I'll try to address it as soon as possible.\n\n## License\n\nThis project conforms to the MIT License (MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarrida%2Fsocializer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomarrida%2Fsocializer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarrida%2Fsocializer/lists"}