I'm working on an iOS and Android that app sends an email that contains 2 images. It doesn't attach the images to the email, rather it links to them via URL using the src property of the img tag in the email's HTML content. I would like to know if I can use Parse to store those images and reference the URLs for the ParseFiles in the email.
My questions are:
Do you just add the image to the database in a new class, or is there a separate location for public assets? (If not I can get the URL by clicking on the file which opens in a new tab in the browser.)
Is that URL guaranteed to never change so long as the image never changes? (If not I'd need to use a query to fetch the images from parse then get its url.)
Does visiting that URL for example in a web browser count as a request Parse keeps track for pricing purposes?
Piece of the email that will render the image:
<img width="186px" border="0" style="display: block; width: 186px;" src=\"http://url_to_photo_needs_to_go_here.png" alt=\"logo\">
You sure can. Every PFFile object includes a url property that you can use to directly access the file.
Simply grab this url property and insert it into the html for your email.
For reference: PFFile Class Reference for iOS (available for other SDK flavors too)
Related
Facebook Feed Dialog 2.9 has deprecated the custom fields (name, caption, picture, description) - https://developers.facebook.com/docs/sharing/reference/feed-dialog.
I'm working on an AJAX site where all content and metadata is loaded dynamically. If I just use the link property, the metadata isn't set on initial retrieval of the page so the post doesn't contain the right content.
How can I share an AJAX page on Facebook without having to go down the route of prerendering static pages server side? Thanks
If you can program your page to populate the appropriate metatags on the page load based off of a variable http:/yoursite.com/yourpage.php?thisversion=1 then when you want to share version 1 of the page, you just share the URL with the appropriate variable to populate it. You can still remain on your current version of the page but when you share the URL that would prompt that specific version, facebook makes a call to that respective URL and pulls the appropriate metatags that would be populated by your variable without having to reload the page your are currently displaying. Sorry I don't have time at the moment but will try and comeback and add some sample code for clarity.
In my widget, I want to display attachment image on to customer portal page. I have created a custom object called 'Events'.All events must have images. So I stored images as attachments. Now we want to display attachment image as thumbnail So I need URL of attachment. I don't how to get URL of attachment.
File attachments aren't exposed to the web server, so you cannot simply reference a path to serve the image based on your object id. You could implement an API call from the controller/widget that queries for the file attachment and then inserts the image into the DOM. This could be done server-side with CPHP; use the FileAttachment sub-object on your custom object to collect the base64 encoded data of the image and then output it in the DOM. Alternatively, you could call the REST API through JavaScript and update the DOM during/after page load to get the image.
This question exists in different flavors, but not for AJAX pages.
I use AJAX to pull a single video into my page and I want a custom FB share button for it. Everything I've read so far says that FB pulls the required title and image from meta-tags in the page's < head> section (og:image and og:title).
I've tried to change the meta properties when the AJAX call returns, before rendering the share button. This hasn't worked. It uses the values that were present upon initial page load. I have yet to encounter a single answer to this question.
Are there data attributes I can add to the 'fb-like' div to specify a custom title and image (similar to data-href)?
Danke!
You need an individual URL for each individual piece of content that you want to share. Open Graph objects (and simple shared links “become” such, automatically) are identified by their URL (og:url).
Now if your whole page is built on AJAX, you still need to create such individual URLs somehow – the Facebook scraper tool does not “speak” JavaScript, and relies solely on the OG meta information that the server delivers for any URL it requests.
Since the hash part of an URL is only of relevance client-side (and does not even get send to the server), “typical” AJAX URLs that rely on those to tell the client which piece of content to load in the background are no good here.
So if you want to share two pieces of content (videos) as http://www.example.com/?v=vid1 and http://www.example.com/?v=vid2, then you have to make sure that your server delivers the meta data for each video under its respective URL.
The title might not be clear - I'm creating an app in Unity and I want it to start the device's default mail client to create a new mail. I can easily do that with mailto. What I don't know how to do is include an image in the mail being composed. In any way: as an attachment, as a part of the mail body or whatever. But it's a local image, so I can't just put a link to it in the mail.
Is it even possible? If so, how?
I doubt if you can do it as the mailto page doesn't mention this as one of the parameters.
At best you can add body and subject.No attachments I suppose
See http://www.faqs.org/rfcs/rfc2368.html
However a hack you can try is in the body that you include
add <img src="your image src"> and hopefully the mail client will recognise this as html markup and render the image when the client opens up.
I haven't tried this though.
I need to do a specific task with Ez Publish but I don't have a clue on how to do it.
What I need to do is a list of Websites(Website directory). I will need to add basically two kinds of data:
Website Name
URL of the website
Then, when I click in the website link it will redirect to a page where I have the IFRAME with the link(URL of the website).
Can someone give me a clue about how to do this with Ez Publish? I'm a beginner.
Best Regards,
You haven't said anything about where you're getting the list from, so I assume you have the list already and just want to know the correct way to input this type of content.
Login to the site admin area, browse to the part of the site you want the list to be at (usually a folder). You'll be adding content items of type 'link' below the folder.
Select the 'Link' content type and click on the 'Create' here button. Enter the content (including the link URL to the page containing the IFRAME) then send for publishing.
I'm assuming the sites are your own, since many sites now take steps to prevent others placing their page in an IFRAME.
If you want this page to not just link to the iframe page, but to actually display the iframe content, then you'll need to override the default link template (copy it and tell eZ to use your version instead) and add a bit of html for the IFRAME.
If you're the main user imputing this content, you could also just allow eZ to accept literal HTML in the main description text areas (XML Block) and just paste in your IFRAME html. Ugly but quick to set-up.
You should be able to find many examples of entering literal html at the community web forums http://share.ez.no/forums
You should create a specific class for that with the two fields you need.
One for the name and another one with the URL.
Then you'll just have to make an override of node/view/full.tpl for your new class Where you will display the name and an iframe with URL that have been typped in your class instance.