Is Heroku hosting incompatible with .net? - facebook-graph-api

I have a Facebook application hosted in Azure coded in c#. But configuration in my Facebook application asks for Hosting URL: that must be hosted in Heroku. So my application can't post actions to Facebook because this error always pops:
Given URL is not allowed by the Application configuration.
How is it supposed to work if I can't add my Azure URL: app.cloudapp.net as a hosting URL if only Heroku URLs are accepted.
Adding my applications's URL to the App Domains in application configuration hasn't helped either.
And strangely another application that I have works fine with no Hosting URL defined.
What I'm supposed to do to solve this, migrate everything to PHP? I know there can be another answer.

Related

Flutter Web and Django routing directly from URL

I have Flutter web and Django backend (REST API). I want to serve flutter web from Django directly. Every thing works fine if I start from domain (localhost:8000) and navigate to (localhost:8000/others) from web. But it shows 404 if I push URL (localhost:8000/others) direct from browser.
Note: On flutter only it works properly (used Navigator 2.0). But on integrating with Django its not working.
this is the error I get.
https://user-images.githubusercontent.com/47693882/122642537-a448d400-d12a-11eb-9dcb-592e1371066f.mp4
My Urls.py
This is the problem because of this, django server and flutter index.html both run on local with port 8000
you try upload index.html on a host
and also deploy django on another server
with this your problem maybe solved

Can I deploy the Django Rest Framework project on Firebase?

We are developing an application using Vue.js and Django. The essence of the application: accept user requests from the form, send them for approval to the backend and send an answer to the frontend. On the localhost everything is already organized and working. Now our frontend is on firebase and I want to deploy my backend part somewhere. So, can I use firebase for deploying my part? Š’ecause I met different ambiguous answers to this question
You cant, I guess you are using Django Rest Framework with Vue.js. So you need deploy your back-end to some machine. You can choose any hosting which can propose you Linux machine. GoogleCloud, DigitalOcean, AWS, Heroku and a lot of others..
I like AWS (In your case as a new user you can run free EC2 for 12-month, if you do not need a lot of performance)

Provider Hosted Apps Launch Issue

I have a provider hosted app (a normal asp.net web forms application) deployed on a typical web server IIS 7.5.
While launching the app from SharePoint Site in Office 365 Multi Tenant, it's throwing the below issue on App launch.
On capturing details using Fiddler, found the following when the app is launched
SPAppToken=&SPSiteUrl=https%3A%2F%2Fabc.sharepoint.com%2Fsites%2Fspdev%2Famsdev%2Famitamsdev&SPSiteTitle=amitamsdev&SPSiteLogoUrl=%2Fsites%2Fspdev%2FSiteAssets%2Flogo.gif&SPSiteLanguage=en-US&SPSiteCulture=en-US&SPRedirectMessage=EndpointAuthorityMatches&SPCorrelationId=31477a9c-2902-204a-8393-67eced1a10b8&SPErrorCorrelationId=31477a9c-2902-204a-8393-67eced1a10b8&
SPErrorInfo=The+requested+operation+requires+an+HTTPS+%28SSL%29+channel.++Ensure+that+the+target+endpoint+address+supports+SSL+and+try+again.++Target+endpoint+address
The SPErrorInfo Part is interesting. I am unable to confirm whether we really need the remote site to be configured for https?
Additional Information - Identity Provider is ACS and it is a low trust app.
Can someone suggest?
Regards,
Nitin Rastogi
In a production environment, you should always be using HTTPS. If you don't, you're exposing yourself (and your organization) to many risks.
If this is your development environment and you are confident this isn't an issue, you may want to look at the accepted answer to this question on the MSDN forums, which mentions the same error message. Their solution to bypass the HTTPS checking:
$c = Get-SPSecurityTokenServiceConfig
$c.AllowMetadataOverHttp = $true
$c.AllowOAuthOverHttp=$true
$c.Update()
When packaging the SharePoint App from Visual Studio, you must ensure that the URL you use is using HTTPS:
In IIS, add an HTTPS binding to the site to achieve this. You would have to reupload the App to SharePoint after packaging it with the new HTTPS URL.
More information here.

django-allauth Registering a site for API Keys

I'm starting out with django and am working on implementing django-allauth to my site.
Key ones I'm interested in:
Google
LinkedIn
Facebook
As I understand it I need to register my application with each of the providers in order to get API keys and tokens.
On these provider sites, when registering an application it is asking for the project name and the project URL.
Question is if I want to at first run my site on my local machine, do I need to register my localhost separately? If so, what should the project name and project URL be?
You can set the localhost in your social apps, for example in Facebook App:
Display Name: My project
Namespace: myproject_test
Site URL: http://127.0.0.1:8000
Canvas URL: http://127.0.0.1:8000/
Secure Canvas URL: https://127.0.0.1:8000/
And when you deploy your site you have to change the settings according to your domain on which you host your site.
In django-allauth after getting the Key and Secret of your app you have to login to admin in your project and go to http://127.0.0.1:8000/admin/socialaccount/socialapp/ to add the provider there before using it.

Chrome packaged application and Facebook redirect url

I have a Chrome Packaged Application that I am currently integrating with the Facebook API. The Facebook Javascript SDK requires that I provide the URL of where my application is hosted and for security reasons they only redirect to this url.
The problem is that a Chrome Packaged Application doesn't have a url. I am aware of the chrome.extension.getURL but this url is not static, it changes per installation. Is there any way to set a URL for a Chrome Application that works for all installations?
Once you publish your app the id from chrome.extension.getURL will not change. The id matches the key used to sign the extension and once you publish an extension to the Web Store that key doesn't change. Developing locally will be more annoying since each time you "load an unpacked extension" it will get a new id.