My favorites
|
Sign in
coderjournal
Nick Berardi's Coder Journal
Project Home
Source
Checkout
|
Browse
|
Changes
|
r36
Source path:
svn
/
trunk
/
Facebook.MvcWebControls
/
CanvasFbmlViewPage.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
using System;
using System.Web;
using System.Web.Mvc;
using Facebook.Components;
namespace Facebook.MvcWebControls
{
/// <summary>
///
/// </summary>
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(System.Security.Permissions.SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class CanvasFbmlViewPage : ViewPage
{
FacebookService _fbService = new FacebookService();
private string _api = null;
private string _secret = null;
private bool _autoAdd = true;
/// <summary>
/// Gets or sets the API.
/// </summary>
/// <value>The API.</value>
public string Api
{
get { return _api; }
set { _api = value; }
}
/// <summary>
/// Gets or sets the secret.
/// </summary>
/// <value>The secret.</value>
public string Secret
{
get { return _secret; }
set { _secret = value; }
}
/// <summary>
/// Gets or sets a value indicating whether [auto add].
/// </summary>
/// <value>
/// <see langword="true"/> if [auto add]; otherwise, <see langword="false"/>.
/// </value>
public bool AutoAdd
{
get { return _autoAdd; }
set { _autoAdd = value; }
}
/// <summary>
/// Gets the FB service.
/// </summary>
/// <value>The FB service.</value>
public FacebookService FBService
{
get { return _fbService; }
}
/// <summary>
/// Handles the Load event of the Page control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
protected void Page_Load(object sender, EventArgs e)
{
// ApplicationKey and Secret are acquired when you sign up for
_fbService.ApplicationKey = _api;
_fbService.Secret = _secret;
BasePageHelper.LoadFBMLPage(_fbService, _autoAdd, Request, Response);
}
}
}
Show details
Hide details
Change log
r10
by nberardi on Apr 11, 2008
Diff
added facebook controls for MVC
Go to:
/trunk/Facebook.MvcWebControls
...MvcWebControls/BasePageHelper.cs
...rols/CanvasFbmlViewMasterPage.cs
...ls/CanvasFbmlViewMasterPage`1.cs
...ebControls/CanvasFbmlViewPage.cs
...Controls/CanvasFbmlViewPage`1.cs
...ls/CanvasIFrameViewMasterPage.cs
.../CanvasIFrameViewMasterPage`1.cs
...Controls/CanvasIFrameViewPage.cs
...ntrols/CanvasIFrameViewPage`1.cs
...s/Facebook.MvcWebControls.csproj
...ontrols/Facebook.WebControls.suo
...cebook.MvcWebControls/Properties
...trols/Properties/AssemblyInfo.cs
/trunk/Resources/Facebook.dll
/trunk/Resources/RouteDebug.dll
Older revisions
All revisions of this file
File info
Size: 2241 bytes, 72 lines
View raw file
Hosted by