Chapter 9: Running Queries and Connecting with Social Media

With mobile phones, the capability to share information across the Internet becomes an important part of any application. Social networks, like Twitter and Facebook, have been at the forefront of this on mobile devices. Thankfully, they both have APIs that can easily be used on mobile devices using AJAX and JSON. When dealing with mobile devices, bandwidth reduction is always important, and JSON objects usually are smaller in size and easy to transform with JavaScript.

Having access to Twitter and Facebook APIs means you can do interesting things with your mobile application. Obviously, you can let users share content with their friends and followers, but it’s also possible to scan Twitter and return data relating to the app’s content, such as individual wines. In Chapter 8 you used the foursquare API to find venues around the user. In a similar way you can use APIs of social networks to pull in data that people have shared using those services.

In this chapter, you build your Activity tab and Wine Detail pages, where you write social functions to share wines on Twitter and Facebook and use their Search APIs to find out more information about what people are saying about the wine. This can provide you with a better outlook on the wine that you have added to your cellar.

In this chapter, you continue to develop the sample app, Corks. You build the functionality enabling users to search for wines, view detailed information ...

Get Smashing Mobile Web Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.