{"id":518,"date":"2012-05-10T23:39:26","date_gmt":"2012-05-10T23:39:26","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/hive\/?p=518"},"modified":"2012-05-11T13:45:04","modified_gmt":"2012-05-11T13:45:04","slug":"apis-%e2%80%93-fetching-user%e2%80%99s-interests-from-existing-sites","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/hive\/2012\/05\/10\/apis-%e2%80%93-fetching-user%e2%80%99s-interests-from-existing-sites\/","title":{"rendered":"APIs \u2013 Fetching User\u2019s Interests from Existing Sites"},"content":{"rendered":"<p>To help make the process of adding interests to the user\u2019s interest list easier, a number of APIs from other websites will be considered to fetch the user\u2019s interest information if they are members of the other websites.<\/p>\n<h2><span style=\"color: #000080\">Facebook<\/span><\/h2>\n<p>To save users time and the trouble of registering, Facebook authentication can be used to allow users to sign into Hive using their Facebook account. When signing in, Hive will request access to certain information about the user from Facebook, and the user must accept this to proceed. Follow this link for more information: <a href=\"https:\/\/developers.facebook.com\/docs\/guides\/web\/#login\">https:\/\/developers.facebook.com\/docs\/guides\/web\/#login<\/a><\/p>\n<ul>\n<li>Facebook Platform uses\u00a0OAuth 2.0\u00a0for authentication and authorisation.<\/li>\n<li>The JavaScript SDK should be used to access Facebook\u2019s API calls.<\/li>\n<li>Hive must be registered with Facebook to receive an App ID which must be used to authenticate the website.<\/li>\n<li>Using the \u201cscope\u201d attribute, Hive can request permission to access certain data from the user\u2019s Facebook account \u2013 by default, Hive will receive the user\u2019s basic information (name, user picture, gender, and locale, but these will not be saved without permission after login since they are optional details for the user to give), but it will also request the user\u2019s email address using the \u201cemail\u201d property, and the user\u2019s likes (interests) using \u201cuser_likes\u201d.<\/li>\n<li>When the user initially signs in via Facebook, they will be presented with the fetched list of \u201clikes\u201d and asked to review and remove any that are not appropriate since some \u201clikes\u201d may not be an interest.<\/li>\n<\/ul>\n<p><a href=\"http:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/fb.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-519\" src=\"http:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/fb.png\" alt=\"\" width=\"551\" height=\"312\" srcset=\"https:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/fb.png 551w, https:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/fb-300x169.png 300w\" sizes=\"auto, (max-width: 551px) 100vw, 551px\" \/><\/a><\/p>\n<h2><span style=\"color: #339966\">Spotify<\/span><\/h2>\n<p>Users of Spotify have a \u201cTop List\u201d, a feature on Spotify which lists a user\u2019s top ten music albums and artists they listen to. Using the Spotify API, Hive can fetch the Information on the user\u2019s favourite music. Additionally, a user\u2019s Spotify music library can be fetched, with unique artists or bands added to their interest list. More information is available at: <a href=\"https:\/\/developer.spotify.com\/technologies\/apps\/docs\/beta\/77bb3cd334.html\">https:\/\/developer.spotify.com\/technologies\/apps\/docs\/beta\/77bb3cd334.html<\/a><\/p>\n<p>The API is known as the Spotify Apps AP and uses HTML5, CSS, and JavaScript, so it should be able to be integrated within Hive. An existing Spotify account is required, and it must be upgraded to a developer account. An App Concept Submission Form must be approved by Spotify before work can begin.<\/p>\n<p><a href=\"http:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/spotify.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-520\" src=\"http:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/spotify.png\" alt=\"\" width=\"672\" height=\"333\" srcset=\"https:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/spotify.png 672w, https:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/spotify-300x148.png 300w\" sizes=\"auto, (max-width: 672px) 100vw, 672px\" \/><\/a><\/p>\n<h2><span style=\"color: #993300\">Netflix<\/span><\/h2>\n<p>The Netflix API has no call to retrieve a user\u2019s favourite\/most highly rated movies, only a user\u2019s rental history. However, the API is able to give a user\u2019s recommended movies, so this list of recommended movies could be a factor used to aid Hive\u2019s own recommendations. Additionally, this list could be compared with other user\u2019s lists for similarity which could increase the chances they are recommended to each other to become friends. More information is at: <a href=\"http:\/\/developer.netflix.com\/docs\/REST_API_Reference#0_53250\">http:\/\/developer.netflix.com\/docs\/REST_API_Reference#0_53250<\/a><\/p>\n<p>Hive needs to be registered with the Netflix Developer Network for a consumer key and shared secret. User login is done using OAuth authorisation.<\/p>\n<p><a href=\"http:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/netflix.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-521\" src=\"http:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/netflix.png\" alt=\"\" width=\"779\" height=\"264\" srcset=\"https:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/netflix.png 779w, https:\/\/blog.soton.ac.uk\/hive\/files\/2012\/05\/netflix-300x101.png 300w\" sizes=\"auto, (max-width: 779px) 100vw, 779px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To help make the process of adding interests to the user\u2019s interest list easier, a number of APIs from other websites will be considered to fetch the user\u2019s interest information if they are members of the other websites. Facebook To &hellip; <a href=\"https:\/\/blog.soton.ac.uk\/hive\/2012\/05\/10\/apis-%e2%80%93-fetching-user%e2%80%99s-interests-from-existing-sites\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":248,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10185,19674],"tags":[6477,5023,27140,20944,27142,27141],"class_list":["post-518","post","type-post","status-publish","format-standard","hentry","category-design-2","category-project-ideas","tag-api","tag-facebook","tag-fetching","tag-interests","tag-netflix","tag-spotify"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/hive\/wp-json\/wp\/v2\/posts\/518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/hive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/hive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/hive\/wp-json\/wp\/v2\/users\/248"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/hive\/wp-json\/wp\/v2\/comments?post=518"}],"version-history":[{"count":3,"href":"https:\/\/blog.soton.ac.uk\/hive\/wp-json\/wp\/v2\/posts\/518\/revisions"}],"predecessor-version":[{"id":646,"href":"https:\/\/blog.soton.ac.uk\/hive\/wp-json\/wp\/v2\/posts\/518\/revisions\/646"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/hive\/wp-json\/wp\/v2\/media?parent=518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/hive\/wp-json\/wp\/v2\/categories?post=518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/hive\/wp-json\/wp\/v2\/tags?post=518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}