how to allow geolocation access on cefsharp browser? - geolocation

I m using cefsharp browser component for my winform app,
And some websites requires geolocation access, but could not find a proper way or a sample code to achive this. how to do that?
reference link I already searched here

Related

Access local web files via Microsoft Edge extension

Recently we migrated a Chrome extension to Microsoft Edge. We face only one problem. Extension should interact with webpages, that works fine with online webpages but not with local files.
Chrome offers for this situation permission called <all_urls>. We tried to use <any url> permission that we found on Microsoft support page, but without any result. We would like to interact with any webpage, not specific one.
Does Edge support this functionality - and if it does, how can we achieve it?
If not, is it planned in near future?
In Chrome, local file access can be achieved by checking Allow access to file URLs in chrome://extensions, however this feature is not supported in Microsoft Edge at now.
As for feature plan, you may want to provide your feedback in their Feedback site.

How to store and access images from Google Drive from my web application

I am developing web based application using ASP.Net MVC 5.0, in my application there is functionality to save images and display in view profile page. so I am created folder in root folder for images and accessing them when required. Now the problem is my server space is limited so I want to use Google Drive facility to save images and access them when I required.
can anyone tell me how to achieve this or post me API documentation.
Thanks in advance for grateful help.
You will need to use the google drive rest api
and more preciselly the file.insert method
one option is to do the http call by yourself
or use the google drive sdk, this page has an .Net exemple at the bottom
https://developers.google.com/drive/v2/reference/files/insert
note that you'll need to handle the authorization.

Delphi, Integrate or combine or join cookie to internet browser

I am using Mozilla firefox to logged-in a particular website, and there are times that I used Internet explorer to logged-in also in the same website.
I'm also using TWebbrowser from Delphi(mywebbrowser), and when I point the URL to navigate, it points that Im already logged-in from Internet Explorer, But I want to use the cookie of Mozilla Firefox, so if Im logged-in to a website using Firefox and Use my own WebBrowser I will not have to logged-in anymore.
Just want to ask if possible to set the cookie of Mozilla Firefox to Internet Explorer will solved? OR there's a lot more than that?
thanks
TWebBrowser is a wrapper for IE's ActiveX/COM object, which shares the same core with the standalone IE browser, which includes cookies.
For what you are asking, you would have to manually access and export Firefox's cookies (I don't know if Firefox has an API for that but I doubt it, so you will have to search online for more details) and re-format them as text files saved into IE's cookies folder. Neither Firefox nor IE will do the export/import for you.

Access "bad sites" list from embedded Chromium?

Embedded Chromium does not have the same protection as stand-alone Chrome does when it comes to warning users about "bad sites". Users of Chrome are familiar with the warning screen that comes up when you attempt to navigate to a web site that Google has detected malware or other nefarious web elements on. However, repeating this operation in embedded Chromium does not lead to the warning screen. Does anyone know how to reproduce this capability so I can add it to my embedded Chromimum project (in Delphi 6 Pro)? If someone has "traced out" the web calls necessary to recreate this capability I'd like to know.
You can check a URL against the Google lists of suspected phishing and malware pages using the Google Safe Browsing API. to see how access this API from delphi check this article Using the Google Safe Browsing API from Delphi from here you can integrate the code of the article inside of your own project.

Work flow for authentication and API use with Twitter on OAuth

I'm a bit confused about all this OAuth bruhaha in the sense that all the examples I can find are for web applications and none of them for desktop applications.
I understand the Web application work flow, but that includes some redirections between the web app and twitter.
How does one do this in an desktop application?
How does the redirects work?
Should I have to include a Web Browser object?
Is there a way to go around this?
Could anyone point me to resources instead of a full blown solution please?
Thanks
Not sure which language you're using, but the .NET library for Twitter called Tweetsharp has a post on using Tweetsharp from a desktop app and authenticating via OAuth. See http://tweetsharp.com/?p=68. If you're not using .NET then perhaps it will inspire something you can do?
Basically, what tweetsharp does is launch the browser to the authentication URL and then waits for the user to return. I don't know of any way to do this other than something like that (Or include a WebBrowser control of some kind to launch the authentication URL in your own window).
Here's a straightforward solution, implemented as a set of PHP scripts for running from the command line. Well documented and explained, with a helpful 'verbose' option for debugging.
http://nullinfo.wordpress.com/oauth-twitter/
After some poking around and asking some questions about this subject to some other programmers, it looks like it's still an ongoing discussion, with no visible light at the end of the tunnel.
But for people interested on the ongoing discussion, here's the best link to have:
OAuth Desktop Discussion
I've seen a few desktop apps get around this by effectively embedding a browser into their program, so they can just open the in-app browser window to let you do the login and authorisation. This strikes me as a bit of a cheat or defeat of purpose because you still end up typing your ID and password inside the application anyway.
One possibility I was thinking of was, your desktop application could embed a mini HTTP server inside it. So then it launches the default browser to perform the authorisation, with a callback URL something like http://127.0.0.1:8765/oauthorized and then just listen for it.
Would that work?
Not sure what you would do for console applications... spawn a copy of lynx?
Include a WebBrowser control in your app. Put it in a panel or a separate form that you'll Form.ShowDialog().
Create a callback for the browser's successful posting of OAuth and one for a rejection. Don't forget to check for a FailWhale.
In the callback, you close the panel or form and store the token.
Here's a nice overview with sample code and everything: http://tweetsharp.com/2009/04/how-to-authenticate-a-desktop-application-with-oauth/

Resources