SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
Going Social




         Connecting Your
         App to Twitter &
              More
#TiLon           London Titanium Meetup - June 2011   @ketan
Background




    London Titanium Meetup - June 2011   @ketan
Background


http://www.stereoartist.com/blog




               London Titanium Meetup - June 2011   @ketan
Integrating
Twitter into
 Titanium

      London Titanium Meetup - June 2011   @ketan
London Titanium Meetup - June 2011   @ketan
London Titanium Meetup - June 2011   @ketan
use
use oAuth…            xAuth…


Connecting your
     app
                        use what?
erm...?
             ??!

              London Titanium Meetup - June 2011   @ketan
Getting Setup




Twitter Application

Github Source Libraries

Titanium Project setup

                      London Titanium Meetup - June 2011   @ketan
Twitter Application
Twitter Application
Twitter Application
Twitter Application
Twitter Application
Twitter Application
Twitter Application
Twitter Application
Twitter Application
Twitter Application
Github
Github
Github
Github
Github
Github
File Structure
                 android


                           Github Package
                 iphone


     Resources
                                  oauth.js
                 app.js


                              oauth_adapter.js

                   lib

                                   sha1.js



                                twitter_api.js

          London Titanium Meetup - June 2011     @ketan
Ti.include('lib/sha1.js');
Ti.include('lib/oauth.js');                               code in your
Ti.include('lib/oauth_adapter.js');
Ti.include('lib/twitter_api.js');                            app.js
// First check for authentication
var tState = oa.oAuthAdapter.isAuthorized();
if (tState != false) {
	   oa.oAuthAdapter.send({
	   	   url:'http://api.twitter.com/1/account/verify_credentials.json',
	   	   parameters:[
	   	   ],
	   	   method:'GET',
	   	   onSuccess:function(response){
	   	   	   response = JSON.parse(response);
        	   // Do something with the response data
	   	   	   alert(response);
	   	   },
         onError:function(response){
	   	   	   response = JSON.parse(response);
        	   // Do something with the response data
	   	   	   alert(response);
	   	   }
	   	   });                                                     GET
}
                                       London Titanium Meetup - June 2011   @ketan
// First check for authentication                code in your
var tState = oa.oAuthAdapter.isAuthorized();
                                                     app.js
if (tState != false) {
	 oa.oAuthAdapter.send({
	 	 url:'https://api.twitter.com/1/statuses/update.json',
	 	 parameters:[
	 	 	 ['display_coordinates','true'],
	 	 	 ['lat',latitude],
	 	 	 ['long',longitude],
	 	 	 ['include_entities',1],
	 	 	 ['status', someText]
	 	 ],
	 	 method:'POST',
	 	 onSuccess:function(response){
	 	 	 response = JSON.parse(response);
       	 // Do something with the response data
	 	 	 alert(response);
	 	 }
    });                                              POST
}

                                 London Titanium Meetup - June 2011   @ketan
Known Issues
     Android

      Browser Password Dialog

     iOS & Android

      xAuth

      Messy Codebase

      Using other Social Networks

       London Titanium Meetup - June 2011   @ketan
Alternatives


Custom URLs

Built in porotocol handlers registered by Apps

Surrey Police App

SCI-FI-LONDON




                       London Titanium Meetup - June 2011   @ketan
London Titanium Meetup - June 2011   @ketan
London Titanium Meetup - June 2011   @ketan
London Titanium Meetup - June 2011   @ketan
Links

Learn about oAuth

Twitter and oAuth

Github account

oAuth library

oAuthTest app

Meetup.com


                    London Titanium Meetup - June 2011   @ketan
Thank
                                 You
http://www.stereoartist.com/blog/london-titanium-june-2011
http://goo.gl/qbijE
                              London Titanium Meetup - June 2011   @ketan

Weitere ähnliche Inhalte

Andere mochten auch

Getting Started with Titanium Studio
Getting Started with Titanium StudioGetting Started with Titanium Studio
Getting Started with Titanium Studio
Ket Majmudar
 
NENE
NENENENE
NENE
GMS
 
Digital Communities Presentation
Digital Communities PresentationDigital Communities Presentation
Digital Communities Presentation
Allan Rakos
 
Quản trị marketing (p1, thuật ngữ,nội dung cơ bản của quản trị m...
Quản trị marketing (p1, thuật ngữ,nội dung cơ bản của quản trị m...Quản trị marketing (p1, thuật ngữ,nội dung cơ bản của quản trị m...
Quản trị marketing (p1, thuật ngữ,nội dung cơ bản của quản trị m...
Ninh Hai Nguyen
 

Andere mochten auch (13)

Titanium London - URLs & Alloy vs CommonJS
Titanium London - URLs & Alloy vs CommonJSTitanium London - URLs & Alloy vs CommonJS
Titanium London - URLs & Alloy vs CommonJS
 
How to build your own 3D Digital Camera rig
How to build your own 3D Digital Camera rig How to build your own 3D Digital Camera rig
How to build your own 3D Digital Camera rig
 
IT Policy, RISK MANAGEMENT
IT Policy, RISK MANAGEMENTIT Policy, RISK MANAGEMENT
IT Policy, RISK MANAGEMENT
 
Getting Started with Titanium Studio
Getting Started with Titanium StudioGetting Started with Titanium Studio
Getting Started with Titanium Studio
 
NENE
NENENENE
NENE
 
SQLite - Dynamic Data in Titanium
SQLite - Dynamic Data in TitaniumSQLite - Dynamic Data in Titanium
SQLite - Dynamic Data in Titanium
 
T-10 Presentation TiConf EU
T-10 Presentation TiConf EU T-10 Presentation TiConf EU
T-10 Presentation TiConf EU
 
Digital Communities Presentation
Digital Communities PresentationDigital Communities Presentation
Digital Communities Presentation
 
Doing marketing in Vietnam
Doing marketing in VietnamDoing marketing in Vietnam
Doing marketing in Vietnam
 
Marketing Management (Part 2: Marketing environment analysis)
Marketing Management (Part 2: Marketing environment analysis)Marketing Management (Part 2: Marketing environment analysis)
Marketing Management (Part 2: Marketing environment analysis)
 
Quản trị marketing (p1, thuật ngữ,nội dung cơ bản của quản trị m...
Quản trị marketing (p1, thuật ngữ,nội dung cơ bản của quản trị m...Quản trị marketing (p1, thuật ngữ,nội dung cơ bản của quản trị m...
Quản trị marketing (p1, thuật ngữ,nội dung cơ bản của quản trị m...
 
Social Network Analysis
Social Network AnalysisSocial Network Analysis
Social Network Analysis
 
CBSE XII Communication And Network Concepts
CBSE XII Communication And Network ConceptsCBSE XII Communication And Network Concepts
CBSE XII Communication And Network Concepts
 

Ähnlich wie Titanium London - Going Social - June 2011

Develping iOS and Android apps using Appcelerator Titanium
Develping iOS and Android apps using Appcelerator TitaniumDevelping iOS and Android apps using Appcelerator Titanium
Develping iOS and Android apps using Appcelerator Titanium
Hasin Hayder
 
Using+javascript+to+build+native+i os+applications
Using+javascript+to+build+native+i os+applicationsUsing+javascript+to+build+native+i os+applications
Using+javascript+to+build+native+i os+applications
Muhammad Ikram Ul Haq
 
Twitter Streaming API
Twitter Streaming APITwitter Streaming API
Twitter Streaming API
Gareth Lloyd
 
#tmeetup BirdHackers API 101
#tmeetup BirdHackers API 101#tmeetup BirdHackers API 101
#tmeetup BirdHackers API 101
jstrellner
 

Ähnlich wie Titanium London - Going Social - June 2011 (20)

Ti.developers.meeting
Ti.developers.meetingTi.developers.meeting
Ti.developers.meeting
 
Titanium开发者平台介绍
Titanium开发者平台介绍Titanium开发者平台介绍
Titanium开发者平台介绍
 
Develping iOS and Android apps using Appcelerator Titanium
Develping iOS and Android apps using Appcelerator TitaniumDevelping iOS and Android apps using Appcelerator Titanium
Develping iOS and Android apps using Appcelerator Titanium
 
NYC Titanium User's Group - 12/13 Organizer Topics + Presentation Video
NYC Titanium User's Group - 12/13 Organizer Topics + Presentation VideoNYC Titanium User's Group - 12/13 Organizer Topics + Presentation Video
NYC Titanium User's Group - 12/13 Organizer Topics + Presentation Video
 
REST dojo Comet
REST dojo CometREST dojo Comet
REST dojo Comet
 
Using JavaScript for Mobile Development
Using JavaScript for Mobile DevelopmentUsing JavaScript for Mobile Development
Using JavaScript for Mobile Development
 
Do zero ao deploy
Do zero ao deployDo zero ao deploy
Do zero ao deploy
 
Using+javascript+to+build+native+i os+applications
Using+javascript+to+build+native+i os+applicationsUsing+javascript+to+build+native+i os+applications
Using+javascript+to+build+native+i os+applications
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
 
NYC Titanium User's Group - 2/18 Organizer Topics
NYC Titanium User's Group - 2/18 Organizer TopicsNYC Titanium User's Group - 2/18 Organizer Topics
NYC Titanium User's Group - 2/18 Organizer Topics
 
Lightweight Enterprise Java With Microprofile
Lightweight Enterprise Java With MicroprofileLightweight Enterprise Java With Microprofile
Lightweight Enterprise Java With Microprofile
 
OKF Annotator technical overview
OKF Annotator technical overviewOKF Annotator technical overview
OKF Annotator technical overview
 
Designing Your API
Designing Your APIDesigning Your API
Designing Your API
 
CTO School - Titanium Overview
CTO School - Titanium OverviewCTO School - Titanium Overview
CTO School - Titanium Overview
 
Twitter Streaming API
Twitter Streaming APITwitter Streaming API
Twitter Streaming API
 
LLPlanets Lightning Talk Presentation No.8
LLPlanets Lightning Talk Presentation No.8LLPlanets Lightning Talk Presentation No.8
LLPlanets Lightning Talk Presentation No.8
 
#tmeetup BirdHackers API 101
#tmeetup BirdHackers API 101#tmeetup BirdHackers API 101
#tmeetup BirdHackers API 101
 
Entity Framework NYC Firestarter
Entity Framework NYC FirestarterEntity Framework NYC Firestarter
Entity Framework NYC Firestarter
 
Python tools for testing web services over HTTP
Python tools for testing web services over HTTPPython tools for testing web services over HTTP
Python tools for testing web services over HTTP
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Titanium London - Going Social - June 2011