Facebook C# SDK - facebook

I'm starting out with the Facebook C# SDK and trying to run the MVC Sample on my test server and am running into the following error:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Facebook.Web.Mvc.ViewUserControl'.
Source Error:
Line 1: <%# Control Language="C#" Inherits="Facebook.Web.Mvc.ViewUserControl" %>
Source File: /Views/Facebook/LoginButton.ascx Line: 1
I've set up several MVC 2.0 projects in the past and have followed the instructions on the getting started section on http://facebooksdk.codeplex.com/ (added and changed setting in web.config, etc.)
What am I missing in order to run the sample project(s).

You are using a very old sample from the SDK. The problem is that the class Facebook.Web.Mvc.ViewUserControl does not exist. That was only in a very early alpha build. I would recommend downloading the new sample to get started. You can get that here: http://facebooksdk.codeplex.com/releases/view/54371#DownloadId=160969

Related

Bundling app with SystemJS using 3rd party library?

How can I get the systemjs builder to ignore third party libraries? We are evaluating wijmo controls for use in an app and they provide wijmo.angular2.min.js, wijmo.input.min.js and wijmo.min.js. We load these after SystemJS in our web page and that works fine because those files register the wijmo modules. However, when we try to bundle it throws an error because it cannot find the files. Sample error:
Unhandled rejection Error on fetch for vendor/wijmo/wijmo.angular2.input.js
at file:///C:/git/prj/dist/vendor/wijmo/wijmo.angular2.input.js
I can add this path to my config but then I get a different error:
'wijmo/*': 'vendor/wijmo/wijmo.angular2.min.js'
Error:
Unhandled rejection TypeError: Error compiling register module "wijmo/wijmo.angular2.input"
at vendor\wijmo\wijmo.angular2.min.js
Source vendor\wijmo\wijmo.angular2.min.js is already a bundle file, so can't
be built as a module.
Edit
Adding this path lets bundling work (at least it builds the bundles), but keeping the line in my config causes the app to error out, apparently being unable to find the class I'm importing (throws unexpected directive 'undefined')...
'wijmo/wijmo.angular2.input': 'vendor/wijmo/wijmo.input.min.js'
I got it to work by adding a 'meta' section to my SystemJS config that told it not to build that path:
var meta = {
'wijmo/*': {
format: 'global',
build: false,
}
};

How to use the plugin sfTCPDFPlugin?

I work with symfony 1.4, and I want to use the plugin sf sfTCPDFPlugin.
I followed step by step all the instructions, I read the question “How to generate PDF using sfTCPDFPlugin in symfony 1.4?” and answers, but when I try to generate a PDF file, I get the following error:
The server returned a "500 Internal Server Error".
In detail, I have done the following:
I installed PEAR - PHP Extension, and run OK.
I installed
successfully the plugin sfTCPDFPlugin
I downloaded and installed
the "TCPDF library"
$ symfony plugin:publish-assets
$ symfony cc
Copy the /plugins/sfTCPDFPlugin/config/pdf_configs.yml into the config folder of your application
Now I try to test the plugin, but when I want to run the function "test" that is included in the plugin, I get the following error:
The server returned a "500 Internal Server Error":
PHP Fatal error: Class 'TCPDF' not found in D:\proyectos\conflictosnew\plugins\sfTCPDFPlugin\lib\sfTCPDF.class.php on line 14
I use Wampsever under Windows XP
Any idea what could be happening?
I have found an error! The link contained in: "Download the TCPDF library" at: http://www.symfony-project.org/plugins/sfTCPDFPlugin, is incorrect, because download fonts only, not the complete library
In the following link you can find the complete library TCPDF:
http://sourceforge.net/projects/tcpdf/files/

Jenkins tag name is invalid

Has anyone seen the following exception from Jenkins?
FATAL: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-Push Notifications API (Master)-3 is invalid
hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-Push Notifications API (Master)-3 is invalid
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:179)
at hudson.plugins.git.GitAPI.tag(GitAPI.java:220)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1239)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1196)
at hudson.FilePath.act(FilePath.java:865)
at hudson.FilePath.act(FilePath.java:838)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1196)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1353)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:689)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:594)
at hudson.model.Run.execute(Run.java:1567)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:237)
Caused by: org.eclipse.jgit.api.errors.InvalidTagNameException: tag name jenkins-Push Notifications API (Master)-3 is invalid
at org.eclipse.jgit.api.TagCommand.processOptions(TagCommand.java:198)
at org.eclipse.jgit.api.TagCommand.call(TagCommand.java:112)
at org.jenkinsci.plugins.gitclient.JGitAPIImpl.tag(JGitAPIImpl.java:175)
... 14 more
This is a Scala project and we are using SBT 12.1 to build it. My googling has only returned issues with older versions of Jenkins which I am past. We have 1.506.
We have a ton of other projects building just fine and some of them are also Scala.
I got this error building a Java project. I'm not sure why this would suddenly crop up, but I was able to work around it by doing the following:
Go to the Advanced... config settings for the Source Code Management section of the build config and check "Skip Internal Tag".
(upgraded from comment)

Unable to properly link external Java library in Eclipse

I've been struggling to properly integrate this Netflix Java Client to access Netflix's API into a very basic Eclipse Java Web Project.
Whenever I try to publish any content referring to this library, I get errors like the following, indicating an inability to resolve the type of the classes in the external library I'm trying to use.
Aug 20, 2011 11:48:42 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [/OSNet03] threw exception [Unable to compile class for JSP:
An error occurred at line: 19 in the jsp file: /index.jsp
NetflixAPIClient cannot be resolved to a type
16: String myConsumerKey = new String("cefjbgekg7566cqrp2atua2n");
17: String myConsumerSecret = new String("redacted");
18:
19: NetflixAPIClient apiClient = new NetflixAPIClient(myConsumerKey, myConsumerSecret);
20: String uri = APIEndpoints.MOVIE_URI + "/2361637";
21: String details = null;
At the top of the file I include the proper class directories like this:
<%# page import="com.netflix.api.*" %>
<%# page import="com.netflix.api.client.*" %>
<%# page import="com.netflix.api.client.dal.*" %>
And I don't receive any errors from Eclipse telling me it can't resolve the classes. Only once I publish it to the server does this error occur.
I've tried building with jre7 and jdk1.7.0. The library I'm trying to work with includes elements that are from Java v6 and v5.
I included the library by building it with Maven and placing the directory in my WEB-INF/lib folder and then including the jar netflix-client-2.3-SNAPSHOT.jar in my Build Path.
I've looked all over the web for possible causes and tried every prescribed solution I've found but none have worked.
You may be able to tell I'm very new to using Eclipse and Java Web Programming but I'm trying to figure things out as best I can as I go.
check if build automatically is on :P. if not try turning it on for once.
if yes then check the project build path and look for libraries. check if the correct jars are there.
also check if your jars are not corrupted.
these are the usual problems for more wait for sm1 else to answer.
you could also try searching for the resource class that can't be resolved using Ctrl+Shift+R and see if the class turns up.
if you don't get it, then just extract the jar and see if the class is there for real.

Zend GData YouTube API errors

Greetings,
Having quite a bit of difficulty with the YouTube API. I added the Zend Gdata folder to my include_path and all of the API tests run fine, but when I try to load the YouTube API Demo App, I get the following error:
Warning: include_once(Zend/Gdata/YouTube.php) [function.include-once]: failed to open stream: No such file or directory in /home/tappess1/public_html/includes/ZendGdata/library/Zend/Loader.php on line 146
Warning: include_once() [function.include]: Failed opening 'Zend/Gdata/YouTube.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tappess1/public_html/includes/ZendGdata/library/Zend/Loader.php on line 146
Warning: require_once(Zend/Exception.php) [function.require-once]: failed to open stream: No such file or directory in /home/tappess1/public_html/includes/ZendGdata/library/Zend/Loader.php on line 98
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Exception.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tappess1/public_html/includes/ZendGdata/library/Zend/Loader.php on line 98
The PHP include_path seems to be set correctly, the tests run.. the issue seems to be either in operations.php in the YouTube API's demo or in Loader.php. The default directory for Loader.php was simply Zend/Loader.php, I generally use $_SERVER['DOCUMENT_ROOT'] . '/path/to/dir'; due to listing restrictions on my host.
Any idea why this will not work? It occurs when I click on the Authenticate link within the demo.
Thanks
Urgh, I had exactly the same errors. My solution was to totally scrap using the Zend GData API and use the REST interface. This way you're writing more code, but it's all under your control.