Tag Archives: Facebook

Facebook Integration

Introduction

This blog will demonstrate and explore Facebook integration into our online Britizen platform. I will first discuss the functionality offered by Facebook integration, followed by a discussion of the initial setup process and requirements, and finally some in depth examples of our implementation’s design.

Functionality

According leading online marketing firm Jetscram (2015) most online users in the UK are already signed up to Facebook. Facebook integration has become a common constituent of the development process for modern web and mobile applications. It allows users an easy way to authenticate their login credentials without the developer having to create a bespoke login system. This also allows developers to add social characteristics and metrics to their application in form of personal profiling and analytics.

Setup & Requirements 

This will not be a step-by-step guide of every stage necessary to implement the Facebook SDK but this will serve as an overview and outline of the most important stages and features.  For this example I will use the mobile iOS platform to demonstrate what is required to integrate Facebook into a potential app. The setup process is essentially split between two main stages: firstly, set up and configure your new app by registering it via the Facebook developer page and secondly, download and add the Facebook SDK to your iOS app build. These two stages will then bridge the gap between your app and the online features of Facebook.

Facebook Registration and Setup

First, sign up to Facebook. This will then give you access to the Facebook developer page which contains relevant downloads for the SDK (System Development Kit) as well as a reference for their proprietary API (Application Programming Interface). To create a new app choose a display name as seen in figure 1, you can also optionally create a unique namespace identifier, this is most commonly created using the reverse namespace convention for example co.uk.britizen.britizen. you can  see an example of the reverse namespace convention later in the IOS configuration screen (figure 3)

Figure1.  App Secret and App Name Selection
Screen Shot 2017-04-08 at 19.43.18

Once you have chosen your app name an App ID and App Secret are generated, you can later use these credentials to connect to the Facebook API from within your application. The App ID and App Secret are used to identify your developer account and allow Facebook to manage and track a multitude of different applications as well as perform app specific analytics. This is contrary to open API’s such as older versions of Google APIs that allowed users direct access to Google API calls without a need for user specific app credentials, by simply editing URI strings.

One of the most salient features of the Facebook dashboard is the ability to recruit and delegate other Facebook members from within the role tab in the Facebook developer dashboard as shown below in figure 2 .

Figure 2. Facebook Roles
Screen Shot 2017-04-09 at 20.05.51

The roles of your development team can be ascribed easily which is helpful for delegating tasks to team members. The roles tab also includes deeper levels of functionality such as in depth analytics for users, testers and developers. This can allow you to keep tabs on your development team’s progress from a central integrated hub. This is great for sandboxing early development before your apps go live, so you can work out any issues before releasing your final version to the public. As administrator your Facebook account is automatically verified for testing. The first feature of the Facebook API we will discuss is single sign on.

Single Sign On

To configure single sign on functionality select iOS tab or which ever proprietary system you are using from the Facebook developers dashboard. Here you can enter the bundle ID for your app, which depending on the nature and platform of your app can consist of either JSON file of meta data if it’s a web application or in the case of iOS an info.plist file which can be edited either in Xcode or a text editor. Make sure that your app’s bundle ID matches the one entered in the Facebook dashboard (you can use the reverse namespace convention for both as discussed earlier in the Facebook registration and setup section). Now select single sign on as seen in figure 3, this allows a user who is already logged in with Facebook to sign into you application with one click. This will generate a unique identifier token which is stored on the user’s device (similarly to how a web cookie stores user information over a period of time) for a user which can be used to login to Facebook as a means of verification. This token can then be used to authorise users for your app. This token can last typically from 24 hours to a 28 days in duration before a user has to re-login to Facebook,  making the sign in process relatively painless in comparison to signing in every time they use your application. The single sign in also eliminates the need for users to re-enter their credentials if they already have a Facebook account, saving a great deal of time when compared to having to set a completely new account with their name and email etc. You now are all set to try out the API on the web dashboard side now let’s delve at little into the app!

Figure 3. Single Sign On
Screen Shot 2017-04-09 at 21.43.05
I won’t go into detail about the specific app side coding and installation as it is beyond the scope of this blog post but I will describe the functionality employed on the software side with visual examples of the results. Once you have configured the web side of the Facebook API you must then install the Facebook SDK packages and dependencies into your application following the Facebook API reference guidelines . Please make sure that you whitelist the Facebook API URL, this is a common mistake as most platforms such as Android and IOS will automatically blacklist or block any external servers URLs for security reasons which of course includes any dependencies or APIs you have installed. Once you have correctly installed the Facebook API you can start building your bespoke Facebook single sign on integration. First create a button object called “login with Facebook” as shown in figure 4 below and create an event to fire when the button is touched by the user. Connect this event to the Facebook sign in function designated by the Facebook API reference.

Figure 4. Login Screen
Screen Shot 2017-05-03 at 22.03.25

This will connect to the API seamlessly and if the user is already logged in will automatically generate their unique login token and sign them into you application as shown below in figure 5.

Figure 5. Sign in Complete
Screen Shot 2017-05-03 at 22.03.44

If the user has not signed into to Facebook recently or does not have a Facebook account the API will automatically open a web view as seen in figure 6, that allows the user to enter their credentials. If after the user has connected to the Facebook web view sign in is unable to verify their current account or create a new one, they will simply be returned to the original login screen seen in figure 4. This will fire an a login error which you can choose to ignore or store for your records. If the user is unable to login with Facebook it is considered good design practice to also create your own authorised login system as a back up to make you app more inclusive.

Figure 6. Facebook Login Web View
Screen Shot 2017-05-05 at 12.34.40

You can also potentially setup similar buttons to connect with Facebook as seen below in figure 7, even after they have logged in with a different system, effectively marrying the two account to each other for one single seamless login experience to a single user account, this is also a powerful feature of the API. You can also of course allow the user to sign out at which point you can direct them back to the original login screen in figure 4 to create a complete login flow.

Figure 7. Settings – Connect with Facebook and Log Out
Screen Shot 2017-05-03 at 22.04.49

I hope this has given the reader some insight into the speed and efficacy of Facebook Single Sign On compared to conventional methods as well as the plethora of features such as analytics and team management offered through the Facebook SDK.

REFERENCES

Facebook, 2017. Facebook for Developers. [Online]
Available at: https://developers.facebook.com/
[Accessed 7 April 2017].

Jetscram, 2014. Social Media User Statistics & Age Demographics for 2014. [Online]
Available at: http://jetscram.com/blog/industry-news/social-media-user-statistics-and-age-demographics-2014/
[Accessed 24 April 2017].

 

Mining financial and social scores from social network data

 

Image courtesy of cafecredit

Introduction

Britizen explores the concept of a social network where the social ‘credit score’ of members and the groups they belong to are co-dependent. This posts considers the academic literature related to developing financial and social credit scores from social network and online shopping platform data. As a result of this research we decided that in the UK it is more feasible to introduce a ‘social’ rather than ‘financial’ credit score social media application.

Analysis of similar Systems looks more closely at existing online social network systems.

Determining credit scores

In the UK, banks and other financial institutions use historical data to evaluate how ‘credit worthy’ an individual customer appears to be. This is used to determine the risk involved in making each loan, and the appropriate interest rate and or security required.

Credit reference agencies such as Experian[1] and Equifax[2] are used to share knowledge of consumer credit behaviour. The financial history of businesses is also recorded and shared via credit reference agencies such as Moody[3], Standard & Poor[4], and Fitch Ratings.[5]

In some countries (including China) micro businesses and consumers find it difficult to obtain credit from mainstream banks and financial instructions because these bodies do not hold such data about them (Kshetri, 2016; Shu, 2015; Wei et al., 2014) Data about online consumer behaviour can be gleaned from:

  • transaction data held by online shopping portals such as Alibaba[6] and Amazon.
  • online payments records from online payments systems such as Alipay[7]and PayPal
  • non-financial data gleaned from users posts and relationships on social media platforms such as Facebook[8]

China Rapid Finance claim to use both financial and ‘unstructured online social’ data[9] to predict whether a borrower is likely to repay a loan. Kapron (2016) suggests that it is unlikely that systems of this kind could operate in the US due to privacy concerns. in general the EU has stricter privacy legislation than the US; it is thought unlikely that use of unstructured social network data for financial credit scoring would be considered acceptable in the UK at present.

Sesame Credit uses a combination of five factors to assess credit. These include “users’ credit history, behavioral habits, ability to pay off debts, personal information and social networks” (China Daily, 2015).  Members can choose to publish their score. Gamification encourages competition between users as to who has the highest score; and incentivizes ‘desirable’ behaviour (making payments promptly). Users also have a direct incentive to recruit others to the platform: their own score increases with the number of their friends. Game theory can be used to model such effects.

In our focus group a Sesame Credit user commented that most Chinese people ‘just know that the more they consume, the higher mark they will get‘. Gamification in Sesame Credit appears to successfully modify user behaviour;  spending more to increase a personal score and obtain more benefits was a common thread.

Facebook have acquired a US patent[10] which includes using the credit rating of a user’s social network to determine whether to reject or proceed with a loan application (Lunt and Facebook, 2012). Kapron states that they have run and withdrawn a pilot experiment on these lines.

Academic literature includes Selde’s study which determined that Facebook data can be used to derive a useful financial credit score (Selde, 2013). Wei at al  also researched the potential effects of using social connections and data to determine credit scores; and suggest that low scoring individuals might be motivated to improve their behaviour in order to improve their scores.

Wei et al also concluded that there is a risk groups will become stratified (homophily) to protect their scores. In a different context; Kossinet and Watts carried out an empirical study into evolving social networks at a large university; and concluded that  the presence of strong ties between two strangers and a mutual aquaintance was stronger than the effects of homophily expressed as class, age, and gender in that situation. If this effect also applies to Britizen it could reduce the tendency of strong triadic closure to result in a very stratified network.

References

China Daily, 2015. Sesame Credit helps you open sesame – Business – Chinadaily.com.cn [WWW Document]. URL http://www.chinadaily.com.cn/business/2015-01/28/content_19431324.htm (accessed 3.4.17).

Kapron, Z., 2016. Measuring Credit: How Baidu, Alibaba And Tencent May Succeed Where Facebook Failed [WWW Document]. URL https://www.forbes.com/sites/zennonkapron/2016/03/17/measuring-credit-how-baidu-alibaba-and-tencent-may-succeed-where-facebook-failed/#332b551327c2 (accessed 3.2.17).

Kshetri, N., 2016. Big data’s role in expanding access to financial services in China [WWW Document]. URL http://dl.acm.org/citation.cfm?id=2906812 (accessed 3.2.17).

Lunt, C., Facebook, I., 2012. Authorization and authentication based on an individual’s social network. US9100400.

Selde, E., 2013. Study of credit scorecard using only Facebook data – Big Data Scoring.

Shu, C., 2015. Data From Alibaba’s E-Commerce Sites Is Now Powering A Credit-Scoring Service | TechCrunch [WWW Document]. URL https://techcrunch.com/2015/01/27/data-from-alibabas-e-commerce-sites-is-now-powering-a-credit-scoring-service/ (accessed 3.2.17).

Wei, Y., Yildirim, P., Bulte, V. den, Christophe, Dellarocas, C., 2014. Credit Scoring with Social Network Data. doi:10.2139/ssrn.2475265

[1] http://www.experian.co.uk/

[2] https://www.equifax.co.uk/

[3] https://www.moodys.com/

[4] https://www.standardandpoors.com/en_US/web/guest/home

[5] https://www.fitchratings.com/site/home

[6] https://www.alibaba.com

[7] https://global.alipay.com/

[8] https://www.facebook.com

[9] http://chinarapidfinance.com/

[10] US9100400

Introduction: What is an Online Social Network System?

Social networks have existed for friendship, business and other reasons long before online groups were created. The Freemasons are thought to have originated in the Middle Ages. Boyd and Ellison (2007) assert that Community Memory was the first computerised bulletin board community in 1973 . Bulletin boards were largely replaced by web based Internet Forums; many of which have been superseded by the social network systems ubiquitous today.

Boyd and Ellison define Social Network Sites (SNS) as

” … web-based services that allow individuals to

(1) construct a public or semi-public profile within a bounded system,

(2) articulate a list of other users with whom they share a connection, and

(3) view and traverse their list of connections and those made by others within the system. The nature and nomenclature of these connections may vary from site to site.”

Typically:

  • SNS allow users to make their social networks public
  • large SNS enable users to maintain their connections with offline groups
  • users can contact new people via a shared third party connection with offline connections to both parties
  • user profiles are included
  • bidirectional confirmation of ‘friendship’ is required (eg Facebook)
  • some (such as Twitter) allow unidirectional ‘followers’ or ‘fans’
  • public messages can be posted on friend’s profiles
  • private messages are allowed between friends
  • initially SNS often attract homogeneous groups
  • some SNS are deliberately exclusive

Popular SNS in 2017 include Facebook, Twitter, and LinkedIn. Britizen is a conceptual design for a SNS who primary purpose is to influence British society.

 

Reference

Boyd, D.M., Ellison, N.B., 2007. Social Network Sites: Definition, History, and Scholarship. J. Comput. Commun. 13, 210–230. doi:10.1111/j.1083-6101.2007.00393.x

 

 

 

Analysis of Similar Systems

In this post we are going to analyze other similar websites and applications that we can find related to the kind of social network we aim to develop.

We will discuss its main features in order to get a general view of the current state of art, know what has been done, what these applications do, and how they relate to our project.

Facebook

Being one of the biggest social networks [1] , Facebook has all the features this kind of application should include.

current news feed.png

Users can check the last updates of the other users through a responsive and interactive timeline, being able to add comments and share their feelings, videos, articles or any other kind of information.

5589-Screenshot_20141230204856

In order to be included on the contacts network of a user, a “Friend request” must be accepted. The search engine eases the process of making new friends, suggesting new contacts based on the current ones of the user. The site allows to access and navigate across the pictures collection of the users, structured by subfolders. Facebook also stores personal information about the users, used for online advertising purposes (one of its biggest revenue sources).

The use of this third party information led to the introduction of a credit rating service run by Facebook in which users are given a score in order to determine whether they are a trust worthy option when giving financial credits.

In February of 2016, Facebook announced they would stop this project and service due to regulatory and consumer concerns [2].  They also stated that they would put restrictions to the amount of information third parties would be able to get from their databases.

This aspect will be taken into account in our project, and will be more explained in following posts, such as Mining financial and social scores from social network data.

Link: https://facebook.com/

MySpace

MySpace used to be the most important social network before the appearance of the new generation SNS such as Facebook. While Facebook was created to be a private social network for friends and family [3], MySpace followed the approach of being a public portal for people where you can share your tastes, recommendations, and other information you want to share, available for everyone.

Captura de pantalla (171)

MySpace allows user to customize the interface more deeply, changing the colour background, the page layout, or adding plug-ins such as music players.

Right now, after being bought by several parties, MySpace is a portal were people can publicly share their favorite music Playlists, portfolio and personal connections.

It has an attractive interface and includes features to browse to music and videos online from the website, as well as the last news about celebrities.

Captura de pantalla (170)

Link: https://myspace.com/

Sesame Credit

Sesame Credit is the financial wing of Alibaba, the biggest online shopping platform of China.

According to an article by BBC [4], the idea is that by 2020, the use of this platform will be compulsory for all Chinese citizens. This way the Government will have a database with information about their financial statements and other personal data such as the kind of contacts they have, their ideology or the activities they do.

Right now, Sesame Credit is used by Chinese citizens as a platform to obtain a credit score that will be used by banks and other financial entities in order to determine whether a person is suitable and trustworthy for a loan. To calculate this score, aspects such as the time to return previous loans back, general financial condition, number of friends who use the application and their consume are taken into account. Users are encouraged to compare their scores, introducing a gamification component to make it more appealing.

chinese-sesame-credit-score-e1450891637339

The site offers different ways of visualization that allow users understand in which aspects they are stronger and which ones need to be improved.

Britizen is based on the idea that comes with Sesame Credit, taking it to another level, exaggerating this social score and control component, where the application of Government values on the user’s daily lives is translated into higher scores, benefits and rewards.

If you are interesed on Sesame Credit or Credit Scores and want to know more about it, again, refer to the post Mining financial and social scores from social network data.

Link: https://www.xin.xin/#/home

Social Credit System

This is the proposed initiative by the Chinese Government to create a citizen reputation system [5]. Making use of personal, social and financial data, each user will be given a score representing how good citizen he is, focusing on four areas: administrative affairs, commercial activities, social behavior and judicial system.

This system is not finished yet, but it is closely related to Sesame Credit and its credit score system.

Quizzle

Similar to Sesame Credit but with a different approach, this application allows users to obtain a credit score and report. This score can be applied in different perspectives such as Payment History, Age and Type of Credit, % of Credit Limit Used, Total Balances/Debt, Recent Credit Behavior or Available Credit.

Quizzle

This application is justified as experts recommend to check the credit report and score before refinancing a house or buying a new one. The app, available for mobile platforms, includes features to estimate home-value and obtain personalized mortgage recommendations.

Using this app, it is possible to obtain a general view of the current financial state and stablish and manage payment plans easily.

credit-report-score-efx

Link: https://www.quizzle.com/


References

  1. Lifewire. 2017. The Top 25 Social Networking Sites People Are Using. Available at: https://www.lifewire.com/top-social-networking-sites-people-are-using-3486554. [Accessed 11 April 2017].
  2. Zennon Kapron. 2016. Forbes. Available at: https://www.forbes.com/sites/zennonkapron/2016/03/17/measuring-credit-how-baidu-alibaba-and-tencent-may-succeed-where-facebook-failed/. [Accessed 11 April 2017].
  3. Reference. 2017. What is the difference between MySpace and Facebook? | Reference.com. Available at: https://www.reference.com/technology/difference-between-myspace-facebook-d53c1627002a5496. [Accessed 11 April 2017].
  4. BBC. 2017. China ‘social credit’: Beijing sets up huge system – BBC News. Available at: http://www.bbc.com/news/world-asia-china-34592186. [Accessed 11 April 2017].
  5. Wikipedia. 2017. Social Credit System – Wikipedia. Available at: https://en.wikipedia.org/wiki/Social_Credit_System. [Accessed 11 April 2017].