GithubHelp home page GithubHelp logo

socialeo's Introduction

Project Title

SOCIALEO - A test app for the mobile team at ENABLON https://enablon.com/

Assignment

Create a mobile app with one view showing the list of the most recent photos posted on Instagram with the account below, following these guidelines:

  • list must show the photos posted by the account provided below
  • some photo metadata (title, comments, dates, number of likes…) should be displayed
  • list must be built to show any number of photos

Getting Started

This is a test app for the mobile team at ENABLON France. To get started you will need to have a valid Account access token to connect to Instagram API and minimum iOS 11.4 installed and Xcode 9.0.

Others adding more features to the app

Adding liking / unliking functionality

To add the the like function, you will first need to create a developer account with Instagram, then register your app, please visit Instagram developer for more information and for the documentation.

Once you have setup your application and allow user a way to authenticate themselves, you can start creating you like functionality.

The like functionality could be done as follow:

  • have a like button on your custom cell

  • a variable to keep tract of the post id

  • a variable to keep tract of your like status for the post, such as as bool

  • a functiontion to triger according to the bool variable status, for isntance if the user already have liked the post, the button should trigger the unlike functionality

  • once the user has triggered and action (like /unlike), the info will be sent to instagram database with the following info:

    • userid
    • postid
    • timestamp of the action
    • check if the user is still log in
  • instagram will add/remove the postid to the user likes and update the likes count accordingly

  • an observer in the app will then trigger a new fetch in the background to reflect the correct info available

  • the app will then reload the list to show the up-to-date info to the user

The comment functionality could be done as follow (see the test app, as the basic functionality is already done):

  • make a comment view controller with a list collectioncontroller (tableview or collectionview)

    • add an inputview (textview)
    • link everything to the commenVC
    • a convenient variable to get the postid
    • a convenient variable to get the userid
    • check if the user is still log in - to avoid no userid available
  • once the user has press the send button, check if the textfield is not empty (if it is do nothing)

  • if textview not empty, userid and postid aren't nil -> create a post object with required info and POST the infoto Instagram server with a callback to update the UI accordingly. For isntance once the post has been sent with success, clear the textview

  • an observer in the app will then trigger a new fetch in the background to reflect the correct info available

  • the app will then reload the list to show the up-to-date info to the user

Added bonus to the assignement

I decide to add some features that could directly benefit ENABLON apps.

socialeo's People

Contributors

mimlrd avatar

Stargazers

 avatar

Watchers

 avatar

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.