Friday, December 12, 2014

Tutorial 5 - Programming update

In previous days, I have the same problem with the Twitter rate limit. It get exceeded very fast and it becomes one of the problem for me to do testing every time. Today discussion with my lecturer, we brought it out the issue and look for the solution.

Notes of discussion:

1.  Cache Data in php

One of the solution is to cache the data in php and one very useful library found in google called Phpfastcache library



2. As for the Processing update, we discussed about the condition for the tweet. I want it to work like
shows tweet by tweet but not grab whole array from php and display all tweets at a time.

(array grab and display at a time) 

My tutor explains the system and concept of the code and guide me through step by step. Things that i need to consider is to code a timer to tell the processing to check and grab the data every 5 seconds.
Next, the condition to draw and store.

Agreed action


1. Phpcachefast,

my working file :





2. Timer, very helpful tutorial I've found at learningprocessing website.



My working file : 





Friday, December 5, 2014

Tutorial 4 - Display array in processing

Show my last progress to my tutor today, and he mentioned that I don't have to display the php into thumbnail but important is to decode it in JSON format,  so processing can read and grab data from php. Today lesson : JSON array


Notes of discussions

1. decode to JSON format with JSON viewer

2. use JsonArray and JsonObject for processing

3.  Twitter rate limit API .  The results always turn to null when the rate is exceeded. It is one of the most troublesome problem for this project.  Further details written in Twitter page ,
( https://dev.twitter.com/rest/public/rate-limiting )
It stated that " if a method allows for 15 requests per rate limit window, then it allows you to make 15 requests per window per leveraged access token. Rate limits in version 1.1 of the API are divided into 15 minute intervals, which is a change from the 60 minute blocks in version 1.0. "


Agreed action

1. I've installed JSONviewer in chrome and searched json decode code . One of the tutorial that I found from google was very helpful from TheCave.info website.
It demonstrates the code of output as JSON using header in php.



My working file :



2. study JSON array and grab php

As for the next step, I have to study the JSON array in processing along with assistance and guiding from my tutor because it was my first time using processing to do my project. I've only have a very basic knowledge on processing during lvl4 in a Arduino workshop.  In Processing official website do have reference and demonstrate on the code on learning. Below is the screenshots of the code that I've used to grab php data.



My working file :

I've successfully to display who tweeted me.



3. Find a way to solve the rate exceeded.






Friday, November 28, 2014

Tutorial 3 - php to processing

Today discussion, is to connect from Php to Processing.

Notes of discusssion
- How to string Json data to processing
- LoadJsonArray

Agreed action
Check on processing load string tutorial to get Json


Monday, November 24, 2014

Php tutprials Twitter API

Good day :D 
I found an youtube tutorial on how to use Php to get Twitter Api by Selim HallaƧ, search tweets or hashtag. Pretty excited on the treasure i found on Youtube. I tried and it works. 






My working file :

Able to grab screenName from people who mentioned me :D  But before start to run it, I have to connect to my local server with Xampp and make sure all the servers are running. 


Xampp





Dreamweaver 






Next step, how to connect it with processing






Friday, November 21, 2014

Tutorial 2 - In depth to processing

Throughout the week, I managed to found source online on using processing to get twitterAPI .
The library called Twitter4j. One of the famous library in the internet when search 'processing' 'twitter'. So I give a try follow step by step from the tutorial but there are some problems/ errors cause of some version update. 

After discuss with my tutor , Yee Siang,

Notes of discussion:
1. Problem with twitter4j documentation
2. Old version of processing or twitter4j
3. debug coding processing

Agreed action:

1. Try other library/ download to latest version 
2. Try to use php to call twitter API
3. Get username 


Due to the unknown error of the coding in processing, not sure cause of the twitter4j version mismatch my processing version or any other reason, i plan to give up on using processing to fetch twitter api but change to Php to fetch the data.

Here the useful link that i found to help the progress goes on :D


https://twitteroauth.com/

As it wrote 'the most popular PHP library for use with the twitter API . Im glad to found one and it can be installed the library and here's a fully documentation done by Abraham on Github. ( https://github.com/abraham/twitteroauth )



Will share the code after I done it right :D Feeling hopeful again. 






Friday, November 14, 2014

Tutorial 1 - update

My project is more related to pulling API programming , I am assign to Yee Siang and Kelvin as my specialist consultation for this final year project. First meeting with my tutor YeeSiang and Kelvin after the break. Updated them with my latest change on ideation of my final year project.


Area of discussion:
- Project Ideation change and Using Processing software for the project


Notes of discussion :

1.  From previous idea 'Artdea' to interactive art project

Initially plan to use Instagram hashtag to create a campaign that require user to share their contents and it changes to # as a key of participation in a data visualisation art project. People contributes their # to create a piece of artwork.


2. Change my project from using # Instagram to Twitter

The reason of changing Instagram to Twitter is because in this case, Twitter is more likely suitable to the project by posting status but not with image. Instagram is toward more to photo social media. And I've observed that Twitter users are likely update their timeline frequently than Instagram user.

3. Twitter API

First step is to study the Twitter API in order to code and stream data from Twitter .
( https://dev.twitter.com/overview/documentation )


" The REST APIs provides programmatic access to read and write Twitter data. Author a new Tweet, read author profile and follower data, and more. The REST API identifies Twitter applications and users using OAuth; responses are available in JSON. " - TwitterDeveloper



4. Twitter Access Token

Before start to stream , we have to register the application and go to manage application to obtain the key and access token.


Get the consumer key and consumer secret for the code later.


5. how to use processing to fetch twitter API and draw something on screen


Look for processing documentation that people share online. Here's is a blog that i found pretty clear with the tutorial it shared using Twitter4j library .

http://saglamdeniz.com/blog/?p=124

Here the official twitter4j library webpage and to free download the source.

http://twitter4j.org/en/


Agreed action:

1. Look for twitter API documentation online and to fetch data with processing

2. Try basic processing and see what I can do or learn so far.


So far so good.


Tuesday, October 7, 2014

Social Media Interactive case study

Recently, me and my friends took part in ' love generator challenge' that related to use digital media in the campaign. It focuses on smartphone, interactive billboard and social media. Throughout the competition period, I have watch a lot of different interactive media approach case study. I have gain more knowledges and possibility that project using social media.
These are the 2 of the case studies that is closer to my direction.

Case study : Nandos #KacauMakan





Digital interactive billboard by Nandos, Malaysia. Audiences can participate and interact with the screen by hashtag #KacauMakan in social media. It looks interesting because user can interact and communicate with the people shown in the screen. Especially , it is real people in a video form but not animation or trigger visual.  In addition, it triggers different result but not a fix result. It attracts a lot of participations and create crowd. From the video, it shows that many to one interaction and , but it likely more to one to one interaction. 

Strength : 
1. Simple interaction by just hashtag on social media 
2. Create crowd in the center and brand exposure in social media.

Weakness (i guess):
1.  The response by user or the screen might get delay depends on the wifi connection. 
2.  The response by many user at a time might get delay or jam in the system.


Case study : Nandos #KacauMakan


This is Levi interactive standalone billboard that installed at station. Users have to hashtag #makeoutmark  via twitter or instagram. I love their campaign objective and the copywriting question " what moves you? "   The objective of this campaign is to encourage people to be yourself, what moves you in another word , "what makes you , you" .  People shares their experience and be confident and expressive of who them are. It creates positivism. 

Strength :
It encourage people to be more expressive and confident of being themself.
Weak :
Somebody might share negative content.