{"id":41376,"date":"2016-12-07T15:40:57","date_gmt":"2016-12-07T10:10:57","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=41376"},"modified":"2016-12-07T16:27:13","modified_gmt":"2016-12-07T10:57:13","slug":"login-with-facebook-for-smart-tv-user-experience","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/login-with-facebook-for-smart-tv-user-experience\/","title":{"rendered":"Login With Facebook for Smart TV &#8211; User Experience"},"content":{"rendered":"<p style=\"padding-left: 30px; text-align: left;\">When developing a web, mobile app or a <a title=\"smart tv app development\" href=\"http:\/\/www.tothenew.com\/mobile-smart-tv-application-development\">Smart TV app<\/a> &#8211; login with Facebook is used for user authentication and conveniently capturing the user&#8217;s social information from Facebook itself.<\/p>\n<p style=\"padding-left: 30px; text-align: left;\">This blog describes the steps to have a clear and consistent user experience for device login on a Smart TV.<\/p>\n<p style=\"text-align: center;\"><strong>\u00a0Flow for Login With Facebook on Smart TV<\/strong><\/p>\n<p style=\"padding-left: 30px;\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-43006 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/12\/Smart-TV-login-Flow.jpg\" alt=\"Smart TV login Flow\" width=\"559\" height=\"444\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/12\/Smart-TV-login-Flow.jpg 792w, \/blog\/wp-ttn-blog\/uploads\/2016\/12\/Smart-TV-login-Flow-300x238.jpg 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/12\/Smart-TV-login-Flow-624x496.jpg 624w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><\/p>\n<ol>\n<li>\n<h2>Login with Facebook Action\u00a0:<\/h2>\n<p>The step is to finalize an appropriate place for the Login button and where the user can <a title=\"Implementing Login With Facebook\" href=\"http:\/\/www.tothenew.com\/blog\/implementing-login-with-facebook\/\">connect to their Facebook profile<\/a>. This can be done at the start of the application or can be also done at any later stages as per the requirements<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-41383 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-login-sample.png\" alt=\"fb-login-sample\" width=\"191\" height=\"40\" \/><\/p>\n<p>The <a title=\"Smart TV App Development Team\" href=\"http:\/\/www.tothenew.com\/mobile-ios-application-development-services\">development team<\/a> must ensure that the call-to-action button is easy-to-use, visually consistent as per the brand colours and closely look like an official Facebook Login button.<\/li>\n<li>\n<h3 id=\"design-step2\">Display Activation\u00a0Code<\/h3>\n<p>When the user clicks the call-to-action button, the device immediately calls the Facebook API which returns an activation code. In interface tell user to go to http:\/\/facebook.com\/device via his\/her desktop and smartphone and enter the displayed code.<\/p>\n<p>The code that returns from Facebook Device Login API is between 6-12 characters long.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-41386 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/display-code.png\" alt=\"display-code\" width=\"434\" height=\"317\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/display-code.png 826w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/display-code-300x219.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/display-code-624x455.png 624w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/p>\n<p>Once the code is displayed, the device starts to poll for the authorization using Facebook Device Login API to check if user has authorized the code or not. If the authorization is not complete the device shows an error message of code expired. Depending upon the case, the response is displayed on the screen for the user.<\/li>\n<li>\n<h3 id=\"design-step3\">Authorization of the Code<\/h3>\n<p>When an user goes to link http:\/\/facebook.com\/device from his\/her desktop then they see the following screen where they see a text field to enter the displayed code on device and click on continue.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-41389 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-1-1024x425.png\" alt=\"fb-device-auth-1\" width=\"572\" height=\"237\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-1-1024x425.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-1-300x124.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-1-624x259.png 624w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-1.png 1349w\" sizes=\"(max-width: 572px) 100vw, 572px\" \/><\/p>\n<p>After clicking on continue user can choose the permissions they want to grant<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-41390 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-2-1024x523.png\" alt=\"fb-device-auth-2\" width=\"570\" height=\"291\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-2-1024x523.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-2-300x153.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-2-624x318.png 624w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-2.png 1284w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/p>\n<p>If user completes the process then Facebook show them the successful login screen<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-41391 size-large aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-3-1024x380.png\" alt=\"fb-device-auth-3\" width=\"625\" height=\"231\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-3-1024x380.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-3-300x111.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-3-624x231.png 624w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-device-auth-3.png 1321w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/li>\n<li>\n<h3 id=\"design-step4\">Login Confirmation<\/h3>\n<p>As soon as user completes its login process for devices, Smart TV continues the polling from Facebook Device Login API, Once the code is authorized Smart TV gets the information and shows user confirmation message of login and ask user to continue.<br \/>\nData of user can be fetched using Facebook Graph APIs.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-41393 aligncenter\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-confirm-login.png\" alt=\"fb-confirm-login\" width=\"485\" height=\"351\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-confirm-login.png 832w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-confirm-login-300x217.png 300w, \/blog\/wp-ttn-blog\/uploads\/2016\/10\/fb-confirm-login-624x452.png 624w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/li>\n<li>\n<h3 id=\"design-step4\">Logout from Facebook Action<\/h3>\n<p>If user wants to logout from device then there should be an option to logout, When user click logout button then we should delete the access_token from Facebook. Device should not store the token and if we have stored the token in database or cloud then we should delete the same from that places.<\/p>\n<p>There is no need to make any API call to invalidate the token.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>When developing a web, mobile app or a Smart TV app &#8211; login with Facebook is used for user authentication and conveniently capturing the user&#8217;s social information from Facebook itself. This blog describes the steps to have a clear and consistent user experience for device login on a Smart TV. \u00a0Flow for Login With Facebook [&hellip;]<\/p>\n","protected":false},"author":302,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":99},"categories":[3479,3477,1772,1],"tags":[3570,707,4269,4094,4204,4201,4205,4095,4202,4861,4268],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/41376"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/302"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=41376"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/41376\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=41376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=41376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=41376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}