what is the difference between Github URL and Github Published Page URL? - github-pages

is Github URL the same thing has Github Published Page URL
I'm trying to get the difference in order to submit my assignment.

Related

Facebook logout url without using Facebook SDK

I'm building a site using React which logs the user in to facebook and fetches their data, which I then use to call another API. This works fine.
What I'm trying to do is then log the user out. I am not using the Facebook SDK.
I can't figure out how to get the logout redirect URL to work. I have the following piece of code which executes upon the user clicking the 'logout' button:
window.location.replace(`https://www.facebook.com/logout.php?next=https://example.com&access_token={accessToken}`
but this appears to just redirect me to the Facebook homepage, and no logging out or redirecting back to my site occurs. I can't find an example in the Graph API documentation that doesn't use the Facebook SDK.

Facebook API - Post to page

I'm trying to figure out how to post to my Facebook page automatically from my website. I have a custom CMS written in PHP that I use with my website, and I have already created the Facebook App and set up the necessary App ID and App Secret. I have PHP code written that when I create a page in my CMS, it will take the Page Title and a blurb of the content and create a post in my Facebook page, however because my Facebook App is not live, only I can see the post.
I've tried to apply for my app to go Live, but have been denied because I do not involve a login process. However, I don't want to log in again. That defeats the whole point of having the extended life access token.
Is it possible to do what I am trying to do? Or is there something I need to include in my app review request to have this approved? Any insight would be greatly appreciated, as the response I get from Facebook is rather generic and unhelpful.
Thank you!

Cannot see timeline-posts posted via developer-app

I want to post to facebook company-page via a developer-app. Therefore I created an app and also an access-token with the following permissions:
manage_pages, pages_show_list, publish_pages, public_profile
Posts are successfully created on the company-page via the app.
The problem I have is the following:
Customer is posting on the companies page.
Answer from the company is posted via the api (app).
The customer sees that there is an comment to his initial post but he cannot see the content of the reply.
I'm pretty sure my access-token is missing some permission but I could not find anything related in the facebook api documentation. Or am I wrong and there is another problem?
Make sure the App is public in the App settings: App Review > "Your app is in development and unavailable to the public."
Postings of Development-Apps usually donĀ“t show up for regular users.

Solution for showing facebook comments on my WP posts from two App ID/API Key

I have built up a new Facebook application for my WordPress site.
I have connected it to my site by "add link to facebook" plugin.
Now my issue is all my past Facebook posts comments (comment integration) are not showing up...How can I pull them back from the old application?
In your plugin code, add xid="URL" and migrated="1" to the fb:comments tag, and it should migrate old comments from the URL to the new app.
The comments are tied to the URL and not the App ID, so as long as you have the correct data-href parameter set, you comments should appear correctly.

me/feed with pic from different domain

I was trying to find this on facebook's site in their documentation but so far no luck. I'm sure others must have run into this before.
I use Amazon S3 for storing images. I didn't know ahead of time that if I named my bucket as my domain name with subdomain I could link that way, so until I move all of the pictures I have to link to mybucket.s3.amazonaws.com domain. When I include a picture from there with a post to the wall the picture doesn't show up. If I change the picture to one on the server itself the picture does show up. It seems that the domain name of the picture must match my app? I looked at bugzilla and didn't see this mentioned. Facebook's forum says to post questions here.
I'm using the C# Facebook SDK from CodePlex.
My code looks like (with error handling and authentication check removed):
var client = new FacebookClient(FACEBOOK_APP_ID, FACEBOOK_SECRET);
client.AccessToken = facebook.AccessToken;
var parameters = new Dictionary<string, object>();
parameters.Add("name", name);
parameters.Add("caption", title);
parameters.Add("message", message);
parameters.Add("link", link);
parameters.Add("source", link);
parameters.Add("picture", imageUrl);
client.Post("me/feed", parameters);
I verified that imageUrl does indeed have a correct picture, the domain name just doesn't match. The picture on amazon s3 has public read access. I can view it from my browser so I don't think it's a permission problem. I've tried a few different pictures with the same problem. Only time it's worked so far is when the picture was on the server itself.
So, my question is, is it a problem with me, or does facebook block images that don't match the domain name specified on the app?
You can upload the picture from that url, then add its object id in the post.
Refer to: http://developers.facebook.com/blog/post/526/?ref=nf
Uploading Photos to the Graph API via a URL
Earlier this year, we released support for uploading photos directly
via the Graph API. This requires sending the photo as a MIME-encoded
form field. We are now enhancing our photo upload capability by
introducing the ability to upload photos simply by providing a URL to
the image. This simplifies photo management for a number of use cases:
App developers who host their images on Amazon S3 or a similar
service can pass the S3 URL directly to Facebook without having to
download the file to their application servers only to upload it
again to Facebook. This improves performance and reduces costs for
developers.
Apps written on platforms that don't have good support for
multipart file uploads can create new photos more easily.
To upload a photo via a URL, simply issue an HTTP POST to
ALBUM_ID/photos with the url field set to the URL of the photo you
wish to upload. You need the publish_stream permission to perform this
operation. You can also include an optional message parameter to set a
caption for the photo.
I'am facing the same issue as well. Based on my observations it seems that facebook does not like it when the picture url has more than one sub-domain.
I tried the below 2 URL variations for the same image..
mybucket.s3.amazonaws.com - throws an error
s3.amazonaws.com/mybucket - works fine
:picture => 'http://mybucket.s3.amazonaws.com/footprints/15/coverimgs/medium.jpg'
OAuthException: (#100) picture URL is not properly formatted
:picture => 'http://s3.amazonaws.com/mybucket/footprints/15/coverimgs/medium.jpg'
{"id"=>"587472956_10150280873767957"}
Now i have to figure out how to change the URL structure for the image while passing it to the FB graph API.
I would log it as a bug. If this is really the case, which I kinda doubt, you could create a 301 redirect on your own domain for each image that redirects to the Amazon url.