Uploading photos to Facebook API on localhost - facebook

I'm trying to test out uploading photos to an album using Facebook API. I am currently testing using Localhost and am trying to figure out how I can provide an appropriate url for the post to the Facebook servers. I have uploaded an image to a tmp folder in my application and have a path for that but is there anyway I can, from this path, create a url that would be appropriate for the image parameter in the query string post to Facebook when I'm using Localhost?

You cannot send a localhost url as an image parameter to Facebook.
If you want to test your code, upload your application to an actual server somewhere which can be accessed over Internet. and then generate a URL and send to to Facebook.
Hope that helps

Related

Getting publicly accessible user thumbnail URL for GSuite public user photos

User's photo URLs are available through the Directory API (I'm using the Java client, which shouldn't matter), however the URL provided is in the private scope, even when that user's profile image is set to public. This causes redirection to a generic silhouette image. I'm aware you can get the base64 encoded 96x96 pixel image via the user/photos API, however needing to serve GSuite's profile images myself is ridiculous. What is the correct flow to get user's image URLs for display?

Get Portal url (Host url) in ArcGIS Online Rest API

I am new to Rest API and trying to develop a client for ArcGIS Online. I tried to login to ArcGIS.com using my login credentials and then see the maps that I have posted on the server. When I click on any map, it opens up in browser with a url like this.
https://services.arcgis.com/N2SwjtBNabcd069C/arcgis/rest/services/IMap/FeatureServer/1
Then I created a different login account, and then published map and tried to open that in browser it showed up with a different url like this
https://services2.arcgis.com/N2SwjtBNabcd069C/arcgis/rest/services/IMap/FeatureServer/1
Note the start of the url
first one is
https://services.arcgis.com/
and second is
https://services2.arcgis.com/
Now my problem is when I try to login in my client application that I am developing. I am able to generate the token, account id and account name. But how do I know which server should I search for to locate my layers(i.e. services2.arcgis.com or services.arcgis.com)? Where can I get this information from
P.S: N2SwjtBNabcd069C in above url is the account id
After you login, and generates your token you can make the following query to see the url of your content.
http://www.arcgis.com/sharing/content/users/<username>?f=json&token=<generatedToken >
This will return you the json that contains the url of your service.

Upload one photo to Facebook fanpage

I'm using this tutorial http://pastebin.com/WpJmPYAi, and with some changes I can upload a photo to my fanpage.
But, I want to be able to upload when I'm logged out from Facebook. In my website, I need to be able to upload images to the fanpage without my account login.
Is this possible?
For example, I think: Is there any way to do this:
$page_info = $facebook->api("/".$fanpage."?fields=access_token");
Without a facebook accounts logged in, only with my app and accounts data.
You can set a stored access_token using the Facebook::setAccessToken($access_token) method.
See the PHP SDK documentation for details: https://developers.facebook.com/docs/reference/php/facebook-setAccessToken/

Create website with facebook login for 0fees.net

Today I was trying to add Facebook features to my site. It's hosted on 0fees.net.
On 0fees.net, I uploaded index.html to my web host, for example mysite.0fees.net. This works, and the page opens fine when I access the URL.
Then, on Facebook, I created my Facebook application, and set the 'Website with Facebook Login' setting as http://mysite.0fees.net/, pressed Save Changes. But I got the error message,
Error Site URL is not a valid URL.
When I try set another URL (for example mysite.1fees.net) the application saved fine.
I do not want to change provider, so how can I set mysite.0fees.net?
When trying to post the link http://0fees.net/ on Facebook, you’ll see a message that you can not do so because the domain is blocked for being spammy. So you’ll have to use another domain, I’m afraid. (That’s the problem with cheap webhosting where you’ll only get a subdomain – let one user do something stupid under that main domain, and all other’s using it will get punished as well.)

Facebook site url different from canvas url

I have a running facebook application (canvas app) on one hosting account.
I tried to create an external website with facebook login using Heroku Node.js, and use this new hosting (the original app created has a different secret and app_id.
If I change the environment variables (secret and app_id) to use my existing (old) app, when I try to run FB calls, I get 'Unsupported get request, error code 100', and the app will not allow any calls.
If I get back to the original app_id and secret given by heroku default - it works well.
Any idea what is the problem? must site url be the same as the canvas url?