Giter Site home page Giter Site logo

getstream / stream-example-php Goto Github PK

View Code? Open in Web Editor NEW
47.0 46.0 22.0 2.45 MB

An example app built using getstream.io https://getstream.io

License: BSD 3-Clause "New" or "Revised" License

PHP 71.76% Shell 0.07% ApacheConf 0.34% CSS 4.11% HTML 23.72%

stream-example-php's Introduction

Stream Example App

This example app shows you how you can use GetStream.io to build a site similar to Pinterest.

The application is built using Laravel 5 and Stream-Laravel.

The project is based on the stream-laravel integration for Stream. There is also a lower level PHP - Stream integration library which is suitable for all PHP applications.

You can sign up for a Stream account at https://getstream.io/get_started.

If you're looking to self-host your feed solution we suggest the open source Stream-Framework, created by the Stream founders.

Live demo

Coming soon.

Deploying the app

Heroku

The best way to understand and try out this application is via Heroku. You can deploy the app, for free, simply by clicking the following button:

Deploy

Local

If you prefer to run this locally then make sure to generate the API keys on GetStream.io and update the settings in config/database.php and in config/packages/get-stream/stream-laravel/config.php.

Once you have the right settings you can get your database ready by running the provision command (./provision.sh)

Tutorial

Coming soon.

Copyright and License Information

Copyright (c) 2015-2017 Stream.io Inc, and individual contributors. All rights reserved.

See the file "LICENSE" for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.

stream-example-php's People

Contributors

concentriccircles avatar dwightgunning avatar tbarbugli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stream-example-php's Issues

Where to register API credentials?

"install" files says "4. get your API credentials (key and secret) from https://getstream.io and store them in app/config/stream.php" but no such file exists in repo.

Should I make this file? How? Do I actually need to? Can I not simply send the credentials over as arguments when instantiating the feed objects?

Deploy to Heroku error

The css is not working correctly, probably because the navbar is above the html in the source code. I'm guessing you have an error in your template layout.

Provision shell file problem

When i run the provision file, i got this error:
[PDOException]
SQLSTATE[08006] [7] FATAL: database "dbname" does not exist

No "timeline" feeds

I have a problem with displaying feeds from "timeline". I've installed the app wich works fine, and connects to the API. I have admin account who follows his own account. But following method from the controller does not retrieve anything:

public function feed()
    {
        $feed = FeedManager::getNewsFeeds(Auth::id())['timeline'];
        $enricher = new Enrich;
        $activities = $feed->getActivities(0,25)['results'];
        $activities = $enricher->enrichActivities($activities);
        return View::make('flat_feed', array('activities'=> $activities));
    }

However, I've created method to retrieve specific user feeds, and it works fine:

public function user_feed()
    {
        $feed = FeedManager::getUserFeed(Auth::id());
        $enricher = new Enrich;
        $activities = $feed->getActivities(0,25)['results'];
        $activities = $enricher->enrichActivities($activities);
        return View::make('flat_feed', array('activities'=> $activities));
    }

Can you tell me why in "timeline" ( feed() method ) there are no feeds ? Thanks

Heroku error

Post deploy exit code was not 0

[32mMigration table created successfully.�[39m
�[32mMigrated:�[39m 2014_10_01_122413_create_users_table
�[32mMigrated:�[39m 2014_10_01_134126_create_items_table
�[32mMigrated:�[39m 2014_10_01_161014_create_pins_table
�[32mMigrated:�[39m 2014_10_02_100110_create_follows_table
�[32mMigrated:�[39m 2014_10_12_100000_create_password_resets_table
�[32mMigrated:�[39m 2014_10_15_121152_add_deleted_at_to_follow_table
�[32mMigrated:�[39m 2014_10_15_121340_add_deleted_at_to_item_table
�[32mSeeded:�[39m UserTableSeeder
�[32mSeeded:�[39m ItemTableSeeder

�[37;41m �[39;49m
�[37;41m [GetStream\Stream\StreamFeedException] �[39;49m
�[37;41m {"code": 6, "detail": "The following feeds are not configured: 'flat'", "du �[39;49m
�[37;41m ration": "7ms", "exception": "FeedConfigException", "status_code": 400} �[39;49m
�[37;41m

enrich?

I can't find references to enrich anywhere what exactly is that?

GetStream\StreamLaravel\Enrich

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.