Publishing to facebook from different websites using one APP ID - api

I'm building a custom CMS for my clients and i've implemented the Facebook API for posting on Page Walls as admin. All works well but I do have one question. Let's say the FB app name is 'CMS FB APP'.
The CMS will reside on my clients' servers, is it possible to use 'CMS FB APP' for all of my clients? Or do I have to create an application for each CMS that I install on every different server?
In the app settings I have to set a Site URL and Site Domain but this is for each client different, I don't seem to find a solution for this problem.

If you are using authentication, you have to create a separate app for each url where your app will be hosted. You will receive an error when the user tries to log in with facebook. Facebook requires that your 'next' and 'cancel' urls in the authentication return urls be on the same domain as your app's Site Url. One solution would be to setup an app with a base url such as example.com and have each client on their own subdomain like client1.example.com, client2.example.com, etc. Short of that, you are stuck making separate apps.

It worked for me when using App domains options in facebook app settings.You can enter multiple domains as App domains
The redirect_uri you use in your code must have the same base domain as that specified in the App Domains.

Related

Shopify App - define url to redirect when app is selected form app list of a shop

I'm new to shopify app development and trying to build a shopify app with node and followed this post here. Everything worked as explained, but I have things to get clarified, may be very basic things.
My question is where to specify the link that's directed when shop owner select my app from the installed apps list of the shop?
As I understood from the post above App URL given in the App info section of the app is used for installation process and from there it's redirected to one of the Whitelisted redirection URL(s) as defined in the app for HMAC validation and exchanging a permanent access token to access the shops' admin API later.
Now Once my test-app is installed to a shop and when the app is selected from the installed apps list, the request again goes to the App URL and get redirected to callback URL generating a new access token. If this is how it is supposed to be, why it's called a permanent access token and need to be stored? If this not how it should be how to specify a url to direct when the app is selected from the installed app list?
In Short
where to define the url to direct when a shop admin select the app from is installed apps section of the shop like shown below.
After install the HMAC validation and temp code is just to get the permanent token, which you should then store securely in a database.
You don't have to show any of that process to the user using your app; you can have it happen in the background and then redirect to whatever route you like after you have the permanent token.

Redirect shopify app url to custom url

I have created an app in shopify and after installing it in the store, I want when I click on the app then it will redirect to other domain like www.abc.com instead of open it in the shopify admin.
I have checked this type of functionality in many apps but don't know how to implement it. Please help me to solve this issue.
Thanks
Firstly, you need to create account as Shopify partners. Once you sign-in in your account, you will see Apps on the left side of the dashboard. You will see Redirection URL in the options available. You can also give name and other details of your app in this session.
most likely your app is an embedded app that is why it is not opening new tab upon clicking from admin app listing. you first understand whether your app required embedding functionality or not.

Google OAuth2 for authentication redirect hangs

I've implemented a simple OAuth2 for Authentication login system that is working reliably on my dev server using a localhost redirect uri.
When testing from a production server, with updated redirect uri, the Google account permission interface opens up for the user logging in. After authorizing account access, the browser just hangs on "Waiting for accounts.google.com..." and doesn't go anywhere. At this point, I can see that the application has been granted access to my profile by viewing account permissions on my Google account dashboard.
If I change the redirect uri to an invalid one, I do get the invalid redirect uri Google error message back, so it looks like the redirection cannot reach my redirect uri. I can reach the reditect uri directly through a browser though. Any pointers?
Had a similar problem trying to create a "Login with Google" App. Since this was my first Google App, and I was also just first using the social networking setups in the software package which I bought BEFORE the Google API had changed, I was at a complete loss as where to start.
It finally dawned on me to redirect Google (via the App settings in the developer console) to a test web page on my site (instead of the page defined by the software package,) and all worked as expected, meaning Google redirected properly to the test page (which was actually just my root index.php). This told me that because the Google API had changed, my software package functionality was obsolete, and I needed to explore the code there.

How to test file.watch on localhost?

I am displaying the contents of a folder in my AngularJS front-end (with Rails back-end). I want to watch the folder for any changes, such as new file, deleted file.
I obviously want to test the app on my localhost before deploying to a server, but I am not able to add localhost as an allowed domain in the apis console.
How can I set-up file.watch for testing?
Thanks
It's impossible to test push notifications without a verified domain, it's why we cant push confidential information to untrusted endpoints. I'd recommend you to buy/use a test domain/sub-domain for testing.
there's portly.co
worke's really nice , you can verify the domain with google site verification, and add it as a push domain.

Facebook login in from a third party static website then redirect to my rails app website

My rails app has many clients with separate data. Apart from admin users for each client using a regular password login from my site I want a public Facebook login where each public user is associated with a particular customer.
My plan is to have each client include a Facebook login on their own static website and use the state parameter to set the client id. After the Facebook authorization the public user should be redirected to my rails site.
Can I do this? The only documentation I can find involves a link to auth/facebook from my rails site, however, I don't want to allow users to initiate a login from my site.
Facebook login on websites ties an app to one domain (or subdomains) - so using the same app for login from different domains will not work. (Although you could have the login button on the other sites link to your app page first, and then handle login there.)