Retrieving image from salesforce for iOS - iphone

I m working on iOS integration with SalesForce. I stuck in following points.
I m using #"SELECT Contact.FirstName FROM Contact" query for getting all member list. Now i want retrieve profile image and company logo for above FirstName person. How can I get these info. One more thing I m using ZKSForce framework.
Thanks.

#Swap
There is no images as standard fields for the Contact object so I don't know what you thought you were trying to retrieve.
Using the user record you can retrieve the chatter photo of a particular person, but I am not aware of such a feature on contact unless you have added it as a custom field. If you provide some more information I might be able to help further.
Paul

# Swap, they have not implemented any function for retrieving image for any user or company logo.
You can see this link for more information.
They are simply returning this information in loginResult.

Related

Is there a way to display the Product Title before the Brand Name in Facebook Page Shop?

I exported all the tags required by Facebook from my third-party online store (Lightspeed) and the data stream works as expected in terms of automatic updates, but products on my facebook page shop (Shop tab) are displayed with the brand name first — L'Oratoire Saint-Joseph — followed by the product title.
See it live : https://www.facebook.com/osaintjoseph/
The unfortunate result is that the text under many products is exactly the same. Is there a way to display the Product Title before the Brand Name?
Lightspeed support told me I had to take it up with Facebook. I am awaiting their reply. See my questions in the fb developer forum here : https://developers.facebook.com/settings/developer/community/
There are 3 ways to add products to Facebook Shop:
Manually
Data feed (e.g. CSV import)
Third party plugins (which you’re using).
Manually – the user is only able to enter 4 properties; title, description, image & variant. See facebook.com/business/help/293945421560847. There is no concept of product brand.
Data feed – this allows for additional properties, such as brand name. In the table, see example files and select product (csv, tsv or xml) facebook.com/business/help/120325381656392?id=725943027795860. However it looks like all Facebook does is concatenate string, that's the product title becomes "{brandName} – {productName}". It look like brand name is not used anywhere else. Nor is there an option to change the way it's displayed. If you edit the product, you should be able to see this in the Product Title.
Shop tab (third party plugin) – (May be it's me, but I found their documentation hard to follow) – They send an XML feed to Facebook support.shoptab.net/hc/en-us/articles/200583466-XML-Feed-for-Facebook-Storefront-with-ShopTab. They do not appear to have a concept of brand. Try and examine the data. I would expect the brand name to appear in the product title. Alternatively they allow for CSV, which also doesn't contain brand name support.shoptab.net/hc/en-us/articles/200583906-CCNow-Integration-with-ShopTab-s-Facebook-Store-App
Summary
If possible, examine the data that is sent from Shop tab to Facebook.
Try and find out if you’re able to exclude / alter the string concatenation of brand name from product title in Shop tab. If not raise a support ticket with them.
Alternatively see if you can manually edit the product title in Facebook. It’s not a long-term fix, but helps understand how the system are integrated.

Wrong image on facebook catalog

I have developed a daily csv file with php and mysql technology. Facebook uses this csv to show all our products on our facebook store.
The problem is that facebook displays a wrong image for some products. I have checked my csv and the image is right.
After that, I accessed to facebook catalog administration over a wrong image, then I saw that the product is showing the right image on the administration page.
Example:
Wrong image: https://www.facebook.com/products/image/?item_id=2344243688984642&display=multi&version=1&image_id=2169702346485626&image_width=186&image_height=186&display_option=background_padding&logging_boundary=item_preview
The right image that appears on 'edit product': https://external.xx.fbcdn.net/safe_image.php?d=AQCLCxZ9xrRUhd9m&url=https%3A%2F%2Fshop.atosa.es%2Fimg%2Fp%2F1%2F0%2F1%2F1%2F1011.jpg&_nc_hash=AQDWNd_Ct7njTn3V
It seems the wrong image is hosted by facebook and the right image by our server
I think that FB has a cache or something similar that do not update the image.
Any idea to update that wrong images?
I believe once before when you've been creating your catalog you still served a wrong image to FB. When FB fetches you feed now it sees the same URL and doesn't update the image because of that.
The solution would be to add any arbitrary parameter at the end of you image link like.
https://youserver/image.jpg?id=1
It should still return your image, but be a new link so that FB could recognize smth has change. It helped in many cases I had with wrong images in catalogs.
The ultimate solution would be to change the product's ID in the feed which will lead to FB creating an absolutely new product in the catalog. Mind, that it will discard product stats and you'll have to send that new ID in pixel or you mobile app.
Try the link solution first. You can also duplicate the product just adding a test one to the feed and check if a new fake test product looks correctly.
Let me know if it helps.

defining object types in open graph for facebook application

I wish to develop an application(facebook) which can publish the current actions of user on my website to his timeline.
Currently , I am able to post updates , but they are not dynamic. I mean I am unable to post the exact price and product name as searched by our user.
I will explain a bit through an example pic
I have set two custom properties Product:prodname and Product:price thinking that it will help me in sending the actual product user has searched and the price of the result he had obtained.
Now, I wish the preview to accept 2 variables prodname and price.
Am I on the right path ? Because facebook is not accepting the singular noun I submitted !
Please suggest and comment, if I am unclear in my question !!
I resolved my problem. The mistake I was doing was that I was setting custom properties to the product(object). However, actually, we need to add custom properties to the compare(action) instead. Finally we need to send the value of the custom properties to the open graph. Just concat it with the open graph url.
Here is a pic explaining the same :-
Snapshot of the page defining the object :-
Snapshot of the part defining the object preview:-
and then the final desired result :-
I don't think the Open Graph supports adding custom properties like that.
You should edit the Preview object to fill out the data or using an existing Product object url.

How does facebook store the friends of a user?

I am wondering how exactly the information that a user with id x is friends with users with ids z,y,w is stored in a very large scale app like facebook.
I am thinking of several possibilities
a) Have a table which maps friendships with the ids of the people involved as foreign keys, as shown here:
Person|isFriendsWith
x -------------------y
x ------------------ z
x------------------- w
Which seems to me it wouldnt scale well at all.
b) Have a field in the users row that stores the ids of their friends in a kind of serialized format like a string "#z#y#w". I suppose with the right algorithm the parsing and updating of this string would be easy.
c) Have a separate table with the friends of each user. Would this be too much load on the server?
d) Something else?
So, if anybody knows what facebook does and can share details it will be appreciated, that's what the question is about. Also, if someone can share insight why what I listed here would not scale well or would have other problems performance-wise, I am interested in hearing it.
Thanks
Here are some links. The first link's page has a link in it on the words "largely complex" that link to a flickr image of a schema. I cannot vouch for the correctness of any of the information in these links:
http://www.makeuseof.com/tag/facebook-work-nuts-bolts-technology-explained/
http://www.theregister.co.uk/2011/07/13/mike_stonebraker_versus_facebook/
http://gigaom.com/cloud/facebook-trapped-in-mysql-fate-worse-than-death/
http://snarfed.org/facebook_data_store_api_thoughts/
The image I mentioned was created by analyzing the business entities in the API that Facebook has opened up. http://blogs.x2line.com/al/archive/2007/06/02/3124.aspx
That was 2007, so may or may not be representative any longer.

how to save comment give by user and and how to save that in webserver database in iphone

hi friend i have to make comment page for user as well as me too
for eg i have map and on that map i select some place and i look some good picture and i taken that picture afterword i have shared that picture as public for comment on that picture if the user comment on that picture then it should be come on review for me how much comment given by user on my picture and and i have to store also in local database
You can store it any details in NSDictionary which will enable you to have different details stored and all of them can be accessed by using the unique Key. If you have multiple elements its better if u maintain an array of dictionaries with each element in the array represent an unique entity and the details of that particular entity is available in the dictionary