I am using this to share a content to facebook:
curl -X POST \
-F "id=http://www.vtrack.cl/" \
-F "scrape=true" \
-F "picture=http://www.vtrack.cl/pub/media/social/gps303g_fb.png" \
"https://graph.facebook.com"
I need to customize which image is shown in the sharing dialog, but it did not work. Can you help me?
You don´t have ANY OG tags on your website. With the scrape=true parameter, you can refresh the OG tags, but i am pretty sure you can´t just set any image. You need to add that image URL as og:image tag.
I am not sure if this is even documented correctly - it should work to refresh the tags though, i am doing the same with JavaScript. There´s definitely no picture parameter though, although i don´t even find the "scrape" parameter and that one definitely works: https://developers.facebook.com/docs/graph-api/reference/v2.5/url
Related
I manage a few bots on Facebook and I normally use this curl call to set the NLP config for a page. I'd like to be able to read the nlp config as well. I can't find a documented approach nor was I able to 'guess' one. Anyone know?
thanks
curl -i -X POST -d "access_token=PAGE_ACCESS_TOKEN"
"https://graph.facebook.com/v2.8/me/nlp_configs?nlp_enabled=true&verbose=true&n_best=1&custom_token=WIT_SERVER_TOKEN"
We've got a WordPress site and I've built a page that pulls from different sections of our site which I'd like to use as the content for a bi-weekly MailChimp newsletter. Is there anyway to automate pulling in a div on our site into the body of a MailChimp template?
All the tools I've found pull in the page as "an article" and just put an image and headline into the message body, rather than the full page verbatim.
Not adverse to doing some coding, but not sure how to start.
Thanks for any suggestions.
I can think of two different routes you might be able to try. The first is to generate an RSS feed for the content you're talking about and then use an RSS Campaign to send the email. Depending on how you have this data stored on your site, WordPress might already be generating an RSS feed for you for that content.
The second option involves more coding. If you create a template with an editable section you can then pass in the content of that section via the API. This is probably harder, since the campaign content APIs are pretty convoluted in v2.0. v3.0 should make that easier, but it's still in beta.
I am looking to export an entire sitecore page. Ideally, upon exporting the links would move from relative to absolutely, but that's not necessary. I want to download the html, css, images, everything from one of my pages. Any help would be greatly appreciated.
Assuming that you want to download one page only, you should be able to just use Save option in your browser. Most of the modern browsers supports all of your requirements. Sitecore web page is like any other html page.
If you want to download the whole site, you can try to use http://www.httrack.com/, wget or Firefox plugin as described here.
If none of those are enough, try to search for save entire site with images and css in your favourite search engine - there are plenty of other possibilites.
If I only have to locally save a page hosted in our Sitecore (really doesn't matter what's hosting it) I use wget.
This seems to work quite well:
wget.exe -E -H -k -K -p --no-check-certificate <your url>
You can change the parameters to recursively spider the whole site, if you do so make sure to check with your security department to not set of any alarms.
In my application I am sharing a set of images from one of my dropbox folder to few people and wrapping some control over it.
Since I am using client.media('path_to_image'), I am getting the exact url and putting it in html as
<img src="the url returned">
, but with an expiry duration.
But it wont be available to other unless the image_path is available in other user's dropbox.
Though the client.share('path_to_image') gives a public url whose expiry date is set too ahead but, the url it returns is shortend one. So I wount be able to use that url in html img tags as src.
So the only way I could short out is to invite the users to my folder so that the image path available in there dropbox client too.
Is there a way to invite users to my dropbox folder, using dropbox python sdk or api.
Any help would be really appreciated.
Thanks in advance.
I'm not sure I understand your problem, or you might be misreading the documentation for client.media(). The URL returned by that API can be used by any user without authentication (until it expires) so it's suitable for use in an tag as you suggest.
If the short URL from client.share(path) is a problem, you can call client.share(path, short_url=False) and get an unshortened URL. The links you get from that call don't lead directly to the image, though, but to a web page on which the image can be viewed or downloaded. You can actually create a direct-download link (unexpiring) from a share link if you replace www.dropbox.com with dl.dropboxusercontent.com in the URL.
I'm trying to embed an mp4 video from an external website onto a wall post using the API. The result should look the same as when a user uploads a video: there is a thumbnail from the video displayed, and clicking on it plays the video inline.
From the documentation, I expected this to work:
$ curl -k -F 'access_token=BAAC8...' \
-F 'message=A test' \
-F 'source=<full url of mp4>' \
https://graph.facebook.com/me/feed
but the source argument just results in the domain name from the URL being displayed, and it's not even a link.
I tried using link= instead of source=. At least it results in a clickable link, but the content is the URL, and clicking on it displays the video in a new page.
I also tried posting to https://graph.facebook.com/me/links, but the result was the same as using links= and /me/feed.
I've found similar questions where the answers suggest it's possible with youtube videos and/or swf files, but they seem to be doing exactly what I've already tried.
Is this possible, and if so, how?