apps.Facebook.com/XYZ vs. Facebook.com/XYZ/app_123456789 - facebook

what's the difference between apps.Facebook and Facebook.com/COMPANY_NAME/app_1234567 ?
For example: http://www.facebook.com/AcademyofArtUniversity/app_307555419320340
I'm trying to build a similar contact form page for a client, but I when I create an app, I get apps.facebook.com/APP_NAME rather than the app name at the end. Is there a difference? Are these different types of apps, or is one just an older style name?
Bonus question: Why wouldn't Academy of Art (using the second step from their example above) request User permissions to pull in the Facebook Graph data rather than require users to re-enter it? Is this related to my question above? Is there a best practice around using Permissions vs. New Entry?

apps.facebook.com/[namespace] is the primary url to a Canvas app, while the latter, `www.facebook.com/[pagename]/app_[appid] is your app added to a page as a Page tab app.
For the second question, this app probably doesn't want to ask for permissions (perhaps to lower the friction) since only a few fields would actually be accesible via the graph.

Related

Custom Dynamic Links in Firebase that goes to user profile

Im pretty new to Firebase, so please bear with me on this one. This problem has been stuck in my head for the past days.
I have seen some videos on Dynamic Links, but i havent seen some clear answers to what im hoping to achieve. I want to create a Dynamic Link, that allow users to share their account with their friends (through a link).
So my question is how can i manually construct a dynamic link (with User A´s uid), so when User B clicks on that link (and has the app) it will go straight into the profile of User A?
Should i create a link when a user signs up and store it under their profile in the database?
Looking forward to hearing how you guys would go about solving this problem im having.
You essentially want to create link where the link parameter (what's called the "Deep link URL" in the Firebase console) looks something like https://www.example.com/userProfile?uid=314159. (The full deep link will look different than this.)
When your app opens up this dynamic link, it will convert the incoming URL to a Dynamic Link object, and that object will have a url property that equals this link parameter. Your app will have to do the work to analyze this url and say, "Oh, this appears to be a request to view a user's profile, so I'm going to redirect to that part of my app". It won't happen automatically.
Whether you create it when the user first signs up, or when they decide to share their profile is kinda up to you. I'm generally not a fan of pre-generating deep links ahead of time, because you might realize later you want to change an aspect of these links, and that's easier to do if you don't have thousands of pre-generated DLs. Keep in mind that either way, there is a network call required to convert these longer URls into a prettier short URL.

Creating a Facebook comment box for different sites

I want to add the facebook comment box to several websites for different people. IT asks for an Appid which at first I thought meant their Facebook Business page id. Now im realizing that I need to create a Facebook App for this. My question is this, can I create one app, take the ID and use that for several different comment boxes on various sites that are not related and owned by different clients? Or should I make new Apps for each one?
Thanks
The comment boxes are separated by the URL you define in the HTML attributes, so technically you can use the same App ID for multiple clients since the pages have different URLs.
Still - I would advise you to create a new application for each client. At some point one client might ask you to give them admin access to the Facebook application - and you don't want to give one client access to the application that also serves your other clients...

Facebook app: Choosing an alternate app at install time

We (will) have two Facebook apps for our company. Some of our users will be eligible for one, some for the other. This is a disjoint set, no users will be eligible for both apps. What we'd like to do is detect during the login/install process that a user has chosen the wrong app, and redirect them to the correct app
Is this possible within the Facebook framework?
No, this functionality does not exist within the Facebook framework. You will have to use your own custom script to decide which app to direct them to.
Some of our users will be eligible for one, some for the other. This is a disjoint set, no users will be eligible for both apps.
Define “eligible” in this context, please.
What we'd like to do is detect during the login/install process that a user has chosen the wrong app, and redirect them to the correct app
And define what you would want to base that decision on at that point too, please.
Apart from the unclear question, one app could still do different things for different users, and could make the decision to categorize which user how based on all the data available to that app.

How to register a Facebook Application dynamically via Graph API like wildfireapp and others doing?

I am trying to create a sweepstakes application.
I am trying to copy wildfire.
But I am unable to create facebook applications dynamically like they are doing.
I checked it they are using graph api to show on front end but there is no method available in graph api to create applications dynamically.
Can anyone please guide me how wildfire is doing dynamic app creation. Is there any alternative available?
In general, they are likely not creating new applications for each client. Unless you can show us evidence of this, it is the same application being installed many times onto their client's Facebook Pages.
The application script can detect the Page ID and change the display logic appropriately. Seen here:
Get Facebook fan page ID
If you really want to create applications for your clients, take a look at this thread:
http://facebook.stackoverflow.com/questions/6264080/create-a-facebook-application-programmatically
EDIT (Not being able to comment is horrible) in response to J's post:
There is not a way to create applications entirely programmatically, but you can get really close creating a user-flow around:
https://www.facebook.com/connect/create_app.php?api_key=[key]&name=app_name
Where [key] is the api_key of the parent application. It isn't documented anywhere so you should have a manual fall back in place. The link above does work to create a new Facebook application tied to the currently logged in user (the parent api_key does not seem to have any effect but it is required).
To determine the api_key of the application created, ask the user for the appropriate permission and query /accounts to retrieve a list of Facebook applications the user owns. Do this before and after the user clicks the above link to determine which one was just created. From there, have the user get a new access_token and get the appropriate permissions to modify application settings. You should then customize the newly created application.
Mike
This has been mentioned several times in the old Facebook forum.
Wildfire, North Social et al, do not create applications dynamically. It's the same application being installed by many clients.
How is this possible? Well, when a Page loads a tab application, Facebook pass you a signed_request parameter. When you decode this signed request with your application's id and secret, you will find inside the page id from where the tab application is being called. You can then use this to work out which of your clients is making the call to your code and therefore what content to deliver to the browser.
There have been changes to the Graph API recently to allow you to manage applications once created but you cannot (and likely will never be able to) create applications programmatically through the Graph API.
The second thread mentioned by Mike mentions child applications but this was deprecated from the Facebook code base some time ago and would not actually allow the creation of applications in the way I assume you want.
J

.NET Web Forms multiple product subscriptions under one account?

Background:
I am working on a legacy ASP.NET 3.5 Web Forms applications. The application allows users to buy a subscription to a 'white-label' website which is generated for them and they can customize it further. It uses forms authentication.
A typical use-case is that the user creates an account on our system, purchases a website, and then proceeds to customize their website. The URL they will use to edit their purchased website is something like this: https://www.example.com/EditWebsite.aspx. There are many other pages also within our website editing toolbox with other URLs.
Problem:
My team has now been tasked with allowing people to use one account to access multiple website subscriptions. This means that one authenticated user could be trying to access one of many websites to edit if they use the URL mentioned above. Our system can be made aware of multiple subscriptionIds per User but the website editor web app only has support for one subscription.
To clarify with a simpler example: this would be like if Google all of a sudden allowed you to view two different inboxes with one GMail account. How would the system know which one you were trying to access if the URLs were the same for both?
We originally wanted to change the application to use URLs like: https://www.example.com/[subID]/EditWebsite.aspx which would give us all the information we need to send the user to the correct website. We looked into URL Routing to accomplish this but it seems that we would have to change all of the web app's internal links to use the route config to generate the correct URLs. Maybe we have the wrong idea here but it seems like too much work for a legacy application.
Another potential solution we came up with was simply using our systems' control panel web app (where they click links to edit any of their websites) to set a session cookie which our edit website web app can read to know which website to bring up. This has the disadvantage that the pages would not be bookmark-able and you could not look at multiple websites at once in different tabs of the same browser.
Question(s):
Is there any other options we have not investigated or thought of? Is there any other web sites which allow for this kind of behavior; how do they handle it? Is URL Routing the right way to do this and we just need to take the plunge?
Any input is appreciated!
The solution we ended up using was adding a URL parameter to the link which specifies which website you are trying to edit.
https://www.example.com/EditWebsite.aspx?subID=123
This parameter is included in the links to 'Edit Website' from the page which lists all of a user's websites.
When present, this sets a session cookie for the user. If the request parameter is not present, the app looks for the cookie being set; this handles all the internal links within the application. if a cookie doesn't exist and the request parameter was not set, we just pick the authenticated user's first subscription from the list.
This isn't perfect but it has worked without issue so far. The only consequence it has caused is that a user cannot edit multiple websites in the same browser session, e.g. using multiple tabs. This hasn't resulted in any support issues yet though so it is pretty much a non-issue.