I'm developing a custom application to automatically post to my business Facebook page.I've created a new app profile and got the API key and secret key and know how to post to my Facebook page automatically using graph API.
My Code:

FB.init({ appId: "My FB API ID", status: true, cookie: true, frictionlessRequests: true });FB.login(function (response) { if (response.authResponse) { var acc_token = response.authResponse.accessToken; FB.api('/me/accounts', 'GET', '', function (response) { console.log(response); if (!response || response.error) { alert(JSON.stringify(response.error)); } else { if (response.data.length > 0) { //-- Check for page list acc_token = response.data[0].access_token; //== Change Accesstoken If a page is exist } var data = { name: "Automatically Feed Posting", link: "www,example,com", access_token: acc_token, description: "Hello, it's for testing" } FB.api('me/feed', 'post', data, function (response) { if (!response || response.error) { alert(JSON.stringify(response.error)); } else { alert("Your Feed Successfully Posted"); } }); } }); } }, { scope: 'email,user_likes,publish_actions,publish_stream,r ead_stream,manage_pages,rsvp_event' });The problem is: If a user have more than one Page, and requesting to '/me/accounts', i got list of all pages. Here i want to first ask to user which page he want to used for automatically posting. (In current senior/above code i fetch first index of page list and use this for posting).
Updated:
After doing some googling ...I found many post, they all suggested to save/ask user to for their page's Id manually(before doing posting) and use this page id when get all pages list and comparing this pageId with list and perform further actions.
For Example:

var Userpage_id = "1234567890"; FB.init({ appId: "My FB API ID", status: true, cookie: true, frictionlessRequests: true }); FB.login(function (response) { if (response.authResponse) { var acc_token = response.authResponse.accessToken; FB.api('/me/accounts', 'GET', '', function (response) { console.log(response); if (!response || response.error) { alert(JSON.stringify(response.error)); } else { if (response.data.length > 0) { //-- Check If page list for(var i=0; i