How my app will work ?
1) User will signup
2) He/She will input his/her website RSS
3) He/She will add his/her social networks to where the website latest posts will automatically load.
I am creating a web application which will grab rss feed from a website which will be input by user, and now from that fetched RSS I want to post the recent and new posts to the social networks. I can easily fetch the RSS via Laravel but what I am trying to do now is share the latest post to social networks like facebook and twitter of the user.
Now the question is How to integrate these social networks where user can integrate his account and then my app will post his website latest posts in there.
What I Tried to do:
I just created a Controller which is able to get the website RSS feeds, but I am confused how to send these feeds to social networking sites ?
Route:
Route::get('/', 'FeedController@demo');
Controller:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
class FeedController extends Controller
{
public function demo() {
$feed = \Feeds::make('http://ift.tt/2atv6KM', true); // if RSS Feed has invalid mime types,
$data = array(
'title' => $feed->get_title(),
'permalink' => $feed->get_permalink(),
'items' => $feed->get_items(),
);
return view('welcome', $data);
}
}
view
<div class="header">
<h1><a href=""></a></h1>
</div>
@foreach ($items as $item)
<div class="item">
<h2><a href=""></a></h2>
<p></p>
<p><small>Posted on </small></p>
</div>
@endforeach
PS : I tired a lot of resources but found nothing, if you know any package/helper that would be great.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire