https://github.com/rakshazi/social2atom
Social networks to Atom feed converter
https://github.com/rakshazi/social2atom
Last synced: 3 months ago
JSON representation
Social networks to Atom feed converter
- Host: GitHub
- URL: https://github.com/rakshazi/social2atom
- Owner: rakshazi
- License: mit
- Created: 2016-01-19T18:57:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-14T11:19:15.000Z (almost 9 years ago)
- Last Synced: 2025-01-21T07:11:34.996Z (5 months ago)
- Language: PHP
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Social networks 2 Atom feed converter
[](https://insight.sensiolabs.com/projects/12dbb7ee-77e8-4f55-8a71-8a9da4c0c576)
Convert social network feeds to atom feed.
**Status list**:
* Vk.com: support post, audio, video, photo, link attachments
* Facebook.com: support post (only text for this moment) from pages### Installation
`composer require rakshazi/social2atom:dev-master`
### Usage
> `$s2a->setConfig()` is optional for vk, but if you want see video and audio - it's required.
```php
setConfig(array(
'general.audio.enclosure' => false, //Add audio files as post content, not as atom entry element (recommended)
//For VK.com (Only if you really need it)
'vk.count' => 100, //Maximum count of posts per feed
'vk.token' => 'YOUR TOKEN', //Needed only for video and audio
//For Facebook.com (Only if you really need it)
'facebook.count' => 100,
'facebook.token' => 'YOUR TOKEN', //Needed for all, use App Token
));
$atomFeedXML = $s2a->convert($url);echo $atomFeedXML;
```### Some implicit reasons (FAQ)
> Q: How to get vk.com token?
>
> A: Read all info here: https://vk.com/dev/auth_sites, you need following scopes:
> `video,offline`> Q: How to get facebook.com token?
>
> A: Create app (for websites) and get it token (App token) here: https://developers.facebook.com/tools/accesstoken/> Q: Why no API libraries were used?
>
> A: Because API library contains a lot of unnecessary (for this project) things
> (eg: Managing users and groups in VK, but really needed only read access to groups)
> and (owing to first part of answer) a lot of unnecessary dependencies.