facebook integration in node js

Solutions on MaxInterview for facebook integration in node js by the best coders in the world

showing results for - "facebook integration in node js"
Christian
14 Apr 2018
1const request = require('request-promise');
2
3module.exports = (app) => {
4
5  // you'll need to have requested 'user_about_me' permissions
6  // in order to get 'quotes' and 'about' fields from search
7  const userFieldSet = 'name, link, is_verified, picture';
8  const pageFieldSet = 'name, category, link, picture, is_verified';
9
10
11  app.post('/facebook-search', (req, res) => {
12    const  { queryTerm, searchType } = req.body;
13
14    const options = {
15      method: 'GET',
16      uri: 'https://graph.facebook.com/search',
17      qs: {
18        access_token: config.user_access_token,
19        q: queryTerm,
20        type: searchType,
21        fields: searchType === 'page' ? pageFieldSet : userFieldSet
22      }
23    };
24
25    request(options)
26      .then(fbRes => {
27// Search results are in the data property of the response.
28// There is another property that allows for pagination of results.
29// Pagination will not be covered in this post,
30// so we only need the data property of the parsed response.
31        const parsedRes = JSON.parse(fbRes).data; 
32        res.json(parsedRes);
33      })
34  });
35}
36
Kelian
10 May 2017
1app.get('/facebook-search/:id', (req, res) => {
2    
3  // you need permission for most of these fields
4  const userFieldSet = 'id, name, about, email, accounts, link, is_verified, significant_other, relationship_status, website, picture, photos, feed';
5    
6  const options = {
7    method: 'GET',
8    uri: `https://graph.facebook.com/v2.8/${req.params.id}`,
9    qs: {
10      access_token: user_access_token,
11      fields: userFieldSet
12    }
13  };
14  request(options)
15    .then(fbRes => {
16      res.json(fbRes);
17    })
18})
19
queries leading to this page
how to connect using facebook nodejs apifacebook sso with react node and passportnode js facebook api in myreact nodejs express facebook loginhow to integrate facebook with node jsfacebook api login node jsgmail facebook login nodejs mongo dbnodejs login with google and facebooklogin by facebbok node apilogin by facebook node jsfacebook com for passport jsoauth facebook nodejsfacebook integration nodejsreact node passport facebook loginautomatic login with facebook account in node jscall facebook api in nodefacebook integration in node jsnode js facebook api examplehow to add facebook auth with npmfacbook nodejs login sdknode js facebook oauth passportfacebook social sign up expresshow to add stay logged in with facebook oauth nodejsfacebook api tutorial nodejsnode js how to use facebook api loginsave facebook user profile on mongodb nodejsnode js use google or facebook access tokenhow to authentication with facebook nodejsnode js facebook implementation exampleoauth 2 0 facebook node jsfacebook login with node jspassport facebook auth in nodenode js facebook loginnode facebook login json emaillogin with social media in node js using passportjsface login nodejsfacebook api node jsfacebook login with nodejs passportimplement login with facebook in node jsfacebook api tutorial nodejs admin tokennode js facebookhow to make a login with facebook page with node jsfacebook login integration using node jslogin with social media or manual in express jsfb account password access using node jsget started with facebook api nodejsfacebook authentication with node jsfacebook integration in node jsnodejs facebook apifacebook using node jshow to connect node app with facebook developerfacebook api nodejsimplement facebook gmail login in my website with passportfacebook passport get user profile nodejsfacebook login signup with nodejs passport and reactfacebook api login for node jshow to create login page in node js using google and facebookfacebook login in node jsfacebook google pasport registration jsfacebook integration with oauth 2 o express jsnode jwt token how to and faceboof passportjsdoes facebook use nodejshow i get accesstoken in oauth2 0 facebook express jshow to implement facebook api in node jsfacebook graph api python examplesimple login and login through google and facebook node jsimplement facebook gmail login in my website with passportjsnodejs facebook loginfacebook oauth nodejsfacebook oauth login without sdk nodejsnodejs facebooknode js register using facebookfacebook node jscomo autenticar com facebook typescript nodejshow to use the facebook passport nodejsgoogle facebook login and signup passport nodejsnode js user aut jwt token with facebook gmail andlogin with facebook in node jsvues passport js facebook loginvuejs passport facebook loginauthticate with facebook node expresssign up with facebook usng node jsnode js facebook api examplefacebook login api nodejssave facebook user profile nodejsnodejs facebook passport callbacknodejs api social media loginvideojs ima integration for webdoes facebook use node jsfacebook oauth2 nodejsfacebook api sdks nodejs examplefacebook login nodejsfacebook authentication in nodejsnode js developer facebookcreate webhooks in githubnodejs facebook authenticationhow to get the accesstoken on facebook oauth 2 0 express jsfacebook authentication node jsfacebook message integration in node js 27facebook integration in node js