I'm trying to make parser from facebook page posts to Squarespace blog posts. I already did it for Instagram but I need json file of the Facebook page.
I need something similar as I have for inst (https://api.instagram.com/v1/users/[USER-ID]/media/recent?access_token=[TOKEN]);
I found few articles how to do it but all of them was made before the facebook’s massive data leak and after that they have made many changes to their app’s permissions and imposed many other rules.
https://developers.facebook.com/docs/graph-api/reference/page/feed/
You need a Page Token of the Page if you own the Page
You need Page Public Content Access approved by Facebook for Pages you do not own
Since you tagged the question with the JS SDK: Make sure not to use hardcoded Access Token on the client! They are always meant to be kept secret.
Related
I have been reviewing the Rest Admin API to try to figure out the answer to this question and I may be simply be looking at the wrong documentation.
We're trying to develop an application that will add custom data-driven pages to the site that will take product(s) from multiple selected categories and display them all on a single page, with checkout forms for each. This is done already by other apps, but we have to do a custom implementation so we can match the client's specific functionality needs. An example of an app that does something similar is the Bundle Builder app, which appears to modify the output of {{ content_for_layout }} in the theme.liquid file. It outputs some JSON gathered from the Shopify database (which can be done with the Shopify REST API) and an empty div. Getting the data isn't my concern, but I can't find anywhere in the docs I've looked at where it describes how to modify storefront HTML output.
I suspect it may do this by adding a template (but it has not added that template to the theme files) and associating it with the page URL, or by modifying the output of an existing template, or by adding a section and somehow integrating it with a page, or otherwise, but I have been unable to find documentation for how to do any of those tasks in the docs I've looked at. Other apps appear to add HTML to the storefront as well, such as Privy (which adds pop-ups), Easy Contact Form, and User Photos
What am I missing?
If you want to fill in an empty element with content, one easy way is to use an App Proxy. Shopify will make a secure callback to your endpoint of choice, and you can return data. You could also return Liquid and Shopify will render it along side the rest of the page chrome, ensuring your Liquid becomes the page.
So I am working on a fairly simple project, basically a web page that should list the captions from a certain instagram account. It's all designed, it just needs to be lit up with the content. Have a look at http://evanshellborn.com/speechofthebeets/.
I found that you can see a json file containing all the necessary data at instagram.com/{username}/media. So in my case, https://www.instagram.com/beets_are_life/media/. So before I put that page actually online, I was on my local machine, and I did a JSON call to that page and it worked perfectly. So I built it all out and my web page loaded the captions just like I wanted it to.
Then I went to put it online, (http://evanshellborn.com/speechofthebeets), but it doesn't work. Have a look at the script at the bottom of it, on my localhost that code works and the captions get loaded. But on the live page, I get an access not allowed error in the console. So I think Instagram doesn't allow this sort of direct access anymore, you have to go through their API.
Now I've tried looking at the API but it seems rather confusing. Basically what I'm asking for is a different JSON url that would give me the same result as https://www.instagram.com/beets_are_life/media/, but that would work from the live page.
I think https://api.instagram.com/v1/users/{user-id}/?access_token=ACCESS-TOKEN would work, just replacing {user-id} with the appropraite user_id. But where do I get an access token?
From reading https://www.instagram.com/developer/authentication/, it looks like you get one when a user puts in their user credentials. But I don't want to have anyone log in, I just want a simple web page.
Hopefully that made sense. How can I do what I want?
Looks like the API url https://www.instagram.com/beets_are_life/media/ does not support jsonp (no callback support), so u cannot use javascript (client side) for making API request, it will fail because of Access-Control-Allow-Origin error on browser side, you have make this API call on server side as proxy.
I guess https://www.instagram.com/<USER_NAME>/media/ is not a publicly documented API, thats the reason it is not supporting jsonp, Instagram uses it for their website and since it is same-origin it will work for them on client-side
This link will help you embeding the instagram on a simple html webpage.
There is a button on the bottom of the post on instagram.when you click on the link a menu pops up. then click on embed
now a box pops up
just copy paste the html and you are done.
it will fetch the post for you
First off: I'm a designer, I'm not a developer. I don't really know php or JS, I know html and css. And that's not changing.
Context: I'm working on designing a website for a client that once it is turned over to the development team will involve using the facebook API to allow users to post things on their facebook walls. I'm not familiar with the facebook API at all and I don't really use facebook. However, I need to know the limitations of these things so I can actually design something that is possible to develop. I tried looking at the facebook API docs, but it's gibberish to me since I'm not a developer.
My actual question: I know text can be added, I know at least one main image can be added to go with the post. Can any custom html/css be added to the content of a facebook post? Specifically the client asked for the stars system on the website to the facebook posts (which would require custom html, css, and images from the site), but after working with the facebook share button/iframe I doubt facebook allows for that type of thing.
And if you don't mind posting a long answer: is there any control over what the post looks like, is that all set by facebook? Things like sizes of images, placement of content, etc. Or is this just another insert iframe (maybe with a few variables) and facebook has 100% control over what goes inside the iframe?
No, you can't control over what the post looks like using Facebook Graph API. Publishing a post only supports the following fields:
message: The main body of the post, otherwise called the status message. Either link or message must be supplied.
link: The URL of a link to attach to the post. Either link or message must be supplied.
actions: The action links attached to the post.
place: Page ID of a location associated with this post.
tags: Comma-separated list of user IDs of people tagged in this post.
privacy: Determines the privacy settings of the post.
object_attachment: Facebook ID for an existing picture in the person's photo albums to use as the thumbnail image.
Source: Graph API User Feed Reference.
As you can see, there is no field to customize the design/template of the post. In short, what you publish using the Graph API will just look like a typical post that you post using Facebook GUI.
I have a WordPress blog account already (abc.wordpress.com). And I have my own web site: www.xyz.com
I would like to integrate my WordPress blog content into my own site. Hopefully something like blog.xyz.com or just replace the home page of xyz.com with abc.wordpress.com
I know that I can download WordPress' code from wordpress.org and run my own WordPress. And having my own MySQL database, but WordPress is always releasing new code. I don't have the time to keep updating the source on my end to match it.
I'm running my own site as a hobby, so I prefer to let WordPress.com to manage the content for me and continue reuse my own blog at abc.wordpress.com, but make the content show up in my own site: xyz.com
I hope I was clear when explaining this.
Anyone knows a way to do this?
Thanks.
If your main worry is about the updates, I would say don't be. A simple click of the 'Updates' button in the wordpress admin is all you need to do in order to apply the updates for wordpress. A notification will pop up alerting you of any updates.
And as Calle has already mentioned, you can retrieve your content via RSS, or you could just export your current content from Wordpress.com, import the content into your own site, and manage it there. Everything would be in one spot.
Good Luck.
I don't know how good you are with programming but there's a PHP library called Simple Pie which would help you retrieve your content via RSS (which Wordpress automatically generates for you). The adress is here: http://simplepie.org/
If you are not very good with programming, perhaps you can get someone to do it for you or find a script which is already written somewhere. I do think RSS is definitely the best way to go.
I also think you exaggerate the problems of hosting Wordpress yourself. It's not something that you have to keep updated with, and if you want to, all you have to do is log in from time to time, perhaps once a month (how often are you writing articles?), and click "update" and Wordpress will do everything for you. Both for your plugins and WP version.
For the ability to use your own domain (xyz.com) and have wordpress redirect users from abc.wordpress.com(your wordpress blog) to your domain requires a premium account.
If you have a premium account then you can just log in to wordpress.com, click 'upgrades' and select 'domains'. From there you will see the option "Map an Existing Domain" and you will want to enter your domain here. Now your wordpress.com blog is what will show when users enter your domain's url (xyz.com).
Alternatively, if you need a workaround with a free wordpress.com account then you want to just embed your blog and for that you will need to use an RSS feed. Note: this method will not maintain your wordpress styles it will merely transport the content. Also by default not all browsers support RSS feeds.
You can view your blog's current feed by adding 'feed' to the end of your wordpress.com url, i.e. abc.wordpress.com/feed. You can read more about feeds here (http://en.support.wordpress.com/feeds/). Now you are just left with the task of figuring out how to embed the feed into your page.
One final hail-mary you might attempt is just redirecting your domain to your blog. Reference on how to do this different ways here: (http://css-tricks.com/redirect-web-page/). Example, place this tag in the section of your domains pages:
<meta http-equiv="refresh" content="0; URL='http://google.com'" />
(this will redirect after 0 seconds to the specified url)
I'm looking to create a Facebook Page with dynamic content based on the user visiting the page. For example, if the user has "liked" something with the consisting of "soccer" then it would display a little module specifically for soccer... or if they liked "baseball" then it would display baseball.
I guess my overall question is: "What content does FB allow developers to scrape and use in their code?" I want to utilize this on the Static FBML application.
Thanks in advance!
You may want check the open graph documentation:
http://developers.facebook.com/docs/opengraph/
Graph API: For accessing profile data
http://developers.facebook.com/docs/reference/api/
In order to request and receive extended information about a profile you need to setup a signed request from the Graph api. This can be done from a custom facebook app.