I am trying to post on user wall using garph api 'Feed method'. When i click on post dialogue appears to put some message that doesnot shows me the attached media file. And when i share , and check on wall there is no thumbnail
Following is my code snippet,
FB.ui({
method : 'feed',
to: '100001256527379',
link : 'http://fbdbcalender.coeus-solutions.de/frontend/images/ecards/file-4faba9e79c380.flv',
name : 'I posted an eCard using Birthday Greetings',
caption : 'Birthday Wish',
description : 'Shared by Sarah',
picture : 'http://fbdbcalender.coeus-solutions.de/frontend/images/covers/cover-4faba6056400c.jpg',
source : 'http://fbdbcalender.coeus-solutions.de/frontend/images/ecards/file-4faba9e79c380.flv'
}
});
Related
How could Image view display photo by URL in SWiftUI?
I have a photo named "0.jpg" in my iPhone, and the URL is "/var/mobile/Containers/Data/Application/EB3DA19A-F7B2-48DD-8681-139C7FCB9090/Documents/Photos".
And my source code is just follows:
var imageSection: some View {
Image(landmark.photoName,bundle: Bundle(url:FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent("Photos")))
}
When running, it would get the error:
[SwiftUI] No image named '0.jpg' found in asset catalog for /var/mobile/Containers/Data/Application/E03608D6-24A5-4797-8C16-DDAEB03AB623/Documents/Photos
And I am sure the jpg file is existing, because I use UIImage as parameter and it would display well:
var imageSection: some View {
Image(uiImage: UIImage(named: "/var/mobile/Containers/Data/Application/EB3DA19A-F7B2-48DD-8681-139C7FCB9090/Documents/Photos/0.jpg"))
}
How could I display the image in the Image without UIImage?
Thank you very much!
See documented Image constructor
/// Creates a labeled image usable as content for controls.
///
/// - Parameters:
/// - name: the name of the image resource to lookup, as well as
/// the localization key with which to label the image.
/// - bundle: the bundle to search for the image resource and
/// localization content. If `nil`, uses the main `Bundle`.
/// Defaults to `nil`.
public init(_ name: String, bundle: Bundle? = nil)
This one "name: the name of the image resource to lookup" - not a file name, but image resource name, and all image resources are now in assets catalogs.
For external images there is Image(uiImage:) which you already found - just use it.
I am a new user of kendo and I have a problem with a gantt!
I have a page with a Gantt kendo. For each activity I have a button edit. When my popup edit is open I have lot of fields and a multiselect. This multiselect should be specific for each activity.
I have put the code below in my function edit Gantt :
$.get('/Activity/ReadMultiSelectActivities?initiativeId=' + #Model.ID + '&excludeSectorId=' + $('#SectorID').val() + "&activityID=" + e.task.id, function (data, status) {
allActivitiesDataSource = new kendo.data.DataSource({
data: data.Data,
group: { field: "SectorName" },
sort: { field: "ActivityNumberString", dir: "asc" }
});
});
var msLinkedActivities = $('#linkedActivities').data('kendoMultiSelect');
msLinkedActivities.setDataSource(allActivitiesDataSource);
My problem is that I get the impression that my code is read into account with a delay time. That is, if I click on edit activity 1 the first time the list is empty, I close the edit and then return to edit activity 1 the list is filled. If then I go on edit activity 2 it will be the list of activity 1 ...
I tried many things that I view on tuto, demo and forum telerik but nothings function!
Have you an Idea for fix this problem please?
For information I have resolve my probelm. This is because the data are long to retrieve and so it made the setDataSource before loading the data!
I'm retrieving posts from a page via the PHP SDK (version 5.0.0). The third post in the feed is a Canvas item and is being returned by the Graph Explorer:
https://developers.facebook.com/tools/explorer/?method=GET&path=578588098993907%2Fposts%3Ffields%3Did%26limit%3D20&version=v2.8
Canvas items:
https://www.facebook.com/business/news/introducing-canvas
Note canvas items are only displayed on mobile and not on desktop - might be related.
When I retrieve the latest posts from the page via the PHP SDK the canvas post is completely ommitted :
$request = $this->client->request('GET',
'/578588098993907/posts',
array('limit' => 10, 'fields' => id));
$response = $this->client->getClient()->sendRequest($request);
$graphEdge = $response->getGraphEdge();
foreach ($graphEdge as $graphNode) {
echo $graphNode->getField('id');
}
(code simplified)
Gives:
578588098993907_578950888957628
578588098993907_578951082290942
578588098993907_578945485624835
578588098993907_578665362319514
578588098993907_578662648986452
578588098993907_578660458986671
578588098993907_578659585653425
578588098993907_578633098989407
578588098993907_578632585656125
578588098993907_578631848989532
The canvas post with ID 578588098993907_578950478957669 is completely omitted from the results.
The example code for the ionic 2 Loading feature that is shown in their docs is:
let loading = Loading.create({
content: 'Please wait...'
});
this.nav.present(loading);
Their online example shows the loading spinner appearing in the centre of the screen but when I try it in my app it appears in the top left hand corner.
How do they get it to appear in the centre?
Do you have the latest CSS/Sass in place?
The following works fine for me:
import {Loading} from "ionic-angular"
// put this inside a method
let loading = Loading.create({
content: 'Please wait...'
});
this.nav.present(loading);
See a working example here:
http://plnkr.co/edit/HzuzbF9sFVEKRsBrnIVI?p=preview
Look at home.ts for the code.
I am building a facebook app. Where I have to show my friends profile picture. But the image is not showing all the time when I run my project. I have used the code like tha
NSString *url = [NSString stringWithFormat:#"http://graph.facebook.com/%#/picture? type=large",friendId];
NSData *imageUrl = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]];
UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageWithData:imageUrl]];
imgView.frame = CGRectMake(100.0f,100.0f,200,200);
[self.view addSubview:imgView];
But when I am printing the url in log then it shows an url and if I go with this url in browser then It shows picture in the browser.
For printing the URL I used the code below:
NSLog(#"%#",url);